AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   shortcut to disable c4? (https://forums.alliedmods.net/showthread.php?t=12767)

n0obie4life 04-24-2005 08:02

shortcut to disable c4?
 
okay. for those who have seen my vote AIO....i want to make a disable c4 cvar.

i know how to do it, but i'm just wondering if there is a shortcut to do it.

cause all my userweapon are

Code:
        if(usersweapon==CSW_KNIFE || usersweapon == CSW_C4 || usersweapon == CSW_M249) {
(just one part of the script)

i want to do this, if the admin activates the cvar:

vote_allowc4 . then the script will just ignore the
Code:
usersweapon == CSW_C4

is there a shortcut to doing that so that it just ignores ALL the csw_c4 in the script?

XxAvalanchexX 04-24-2005 13:13

You have to change every
Code:
usersweapon == CSW_C4
into a
Code:
(usersweapon == CSW_C4 && !get_cvar_num("vote_allowc4"))
. Note the parentheses.

n0obie4life 04-26-2005 02:40

Quote:

Originally Posted by XxAvalanchexX
You have to change every
Code:
usersweapon == CSW_C4
into a
Code:
(usersweapon == CSW_C4 && !get_cvar_num("vote_allowc4"))
. Note the parentheses.

aye, tanks. that was what i know how to do, but there doesn't seem to be any shortcut, so nvm :D


All times are GMT -4. The time now is 16:46.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.