Перейти к содержимому
View in the app

A better way to browse. Learn more.

Zloplay community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Опубликовано:

I didn't exactly know what to call this, but anyways, this is for people who need to change the cg_gun dvars automatically with scripts for whatever reason, but usually because of weapon modifications.

 

Example here: viewtopic.php?f=7&t=27087

 

 

Anyways it's just a simple loop with a case statement:

 

// script made by JoeyB
// cg_gun dvars

#include common_scripts\utility;
#include maps\mp\_utility;
#include maps\mp\gametypes\_hud_util;

init()
{
level thread onPlayerConnect();
}

onPlayerConnect()
{
level endon( "game_ended" );
for(;
{
	level waittill( "connected", player );
	player thread onPlayerSpawned();
}
}

onPlayerSpawned()
{
self endon( "disconnect" );

for(;
{
	self waittill("spawned_player");

	self thread cgGunDvars();
}
}

cgGunDvars()
{
self endon("death");
for(;
{
	wait .05;
	if(!isDefined(self.pers["oldweap"]) || self.pers["oldweap"] != self getCurrentWeapon())
	{
		switch(self getCurrentWeapon())
		{
			case "cheytac_fmj_mp": // weapon name here
				self setClientDvar("cg_gun_z", 1.162); // can also change cg_gun_y or cg_gun_x on another line.
			break;

			default:
				self setClientDvar("cg_gun_z", 0);
		}
		self.pers["oldweap"] = self getCurrentWeapon();
	}
}
}

 

Just throw it in a .gsc in /scripts/ and it should work. :D

 

Hopefully helps a few people out.

Опубликовано:

Oh, good, someone who uses the /scripts/ system, not just simply modifying _rank.gsc and saying, HEY GUYS, MY MOD THAT IS INCOMPATIBLE WITH EVERY OTHER MOD IN EXISTENCE UNLESS YOU SPEND AGES FIXING IT!

Опубликовано:
  • Автор
Oh, good, someone who uses the /scripts/ system, not just simply modifying _rank.gsc and saying, HEY GUYS, MY MOD THAT IS INCOMPATIBLE WITH EVERY OTHER MOD IN EXISTENCE UNLESS YOU SPEND AGES FIXING IT!

Well, before I was using _load.gsc and a folder I created \mods\, but NTA commented asking why I didn't use /scripts/ as I was unaware it was fixed (it previously didn't work -- or it was bugged).

Опубликовано:

We should really have more mod developers using /scripts/, as it allows for many more mods, and much more possibilities.

Опубликовано:
Oh, good, someone who uses the /scripts/ system, not just simply modifying _rank.gsc and saying, HEY GUYS, MY MOD THAT IS INCOMPATIBLE WITH EVERY OTHER MOD IN EXISTENCE UNLESS YOU SPEND AGES FIXING IT!

You seem to know quite a lot for a newcomer

Опубликовано:
Oh, good, someone who uses the /scripts/ system, not just simply modifying _rank.gsc and saying, HEY GUYS, MY MOD THAT IS INCOMPATIBLE WITH EVERY OTHER MOD IN EXISTENCE UNLESS YOU SPEND AGES FIXING IT!

 

Well, some mods actually have to modify some of the stock scripts to a certain extent (e.g. if you want class limiting without creating a new gametype etc.)...but i agree with your point mainly.

Some 'modders' seem to think that _rank.gsc is the holy bible.

Опубликовано:
  • Автор
Oh, good, someone who uses the /scripts/ system, not just simply modifying _rank.gsc and saying, HEY GUYS, MY MOD THAT IS INCOMPATIBLE WITH EVERY OTHER MOD IN EXISTENCE UNLESS YOU SPEND AGES FIXING IT!

 

Well, some mods actually have to modify some of the stock scripts to a certain extent (e.g. if you want class limiting without creating a new gametype etc.)...but i agree with your point mainly.

Some 'modders' seem to think that _rank.gsc is the holy bible.

Mainly because it has onPlayerSpawned/onPlayerConnect/etc. when in reality they could just thread a new gsc file and add it themselves lol.

But yeah modifying default game files is a must sometimes.

Опубликовано:
Oh, good, someone who uses the /scripts/ system, not just simply modifying _rank.gsc and saying, HEY GUYS, MY MOD THAT IS INCOMPATIBLE WITH EVERY OTHER MOD IN EXISTENCE UNLESS YOU SPEND AGES FIXING IT!

 

Well, some mods actually have to modify some of the stock scripts to a certain extent (e.g. if you want class limiting without creating a new gametype etc.)...but i agree with your point mainly.

Some 'modders' seem to think that _rank.gsc is the holy bible.

 

Yes, I'll accept that some mods do need to modify certain stock scripts, but that should be kept to a minimum, only when you need it.

Опубликовано:

joeyb - the first (probably not, but first /I've/ seen) one to actually use my system

 

i thank you.

 

(now use my fucking file system commands)

Опубликовано:
JoeyB":15pr9nlz]
joeyb - the first (probably not, but first /I've/ seen) one to actually use my system

 

i thank you.

 

(now use my fucking file system commands)

File system commands? :P

 

Also, no problem. :)

viewtopic.php?f=18&t=3840

 

something I added a long time ago, no one ever used them

:(

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Гость
Ответить в тему...

Сейчас на странице 0

  • Нет пользователей, просматривающих эту страницу

Важная информация

Используя этот сайт, вы соглашаетесь Условия использования.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.