Quote:
Originally Posted by red_bull2oo6
PHP Code:
public plugin_cfg ( ) { if ( get_pcvar_num ( Cvars [ CVAR_STATUS ] ) == 0 ) { log_amx ( "Plugin paused" ) pause ( "a" ) } }
what happens if server starts with the cvar value 0 than i want to change it to 1.
for example i want it always deactivated and only when i need/want, to activate it.
i think you could return FMRES_IGNORED; in TraceAttack forward if the cvar is 0.
also i saw this ( you always declare a new variable to use it in one switch.. )
PHP Code:
new iNum = random_num ( 1 , 3 ) switch ( iNum ) { --> switch ( random_num ( 1 , 3 ) ) {
|
1. Cvar is default 1, no problem in this.
2. FMRES_INGORED in a ham forward ? Are you serious ? Anyway, it's better to pause it, we avoid that some code to execute when it shouldn't.
3. Where do you saw that "I always declare a new variable to use it in one switch" ? But, you are right here, updated.
Edit: fw is not a fakemeta tag. I understand what you want to say with plugin_cfg but it's ok, because it will be auto-disabled on non-hostage maps, you don't need to care to activate/deactivate it and you have no reason to keep the cvar to 0 if you want to run it into current map.