AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   auto cvar on x round (https://forums.alliedmods.net/showthread.php?t=204813)

Adrian45 01-03-2013 17:09

auto cvar on x round
 
1 Attachment(s)
i need a plugin to execute some cvars on x round
i've tried to make one from an auto round restart plugin

PHP Code:

#include < amxmodx >

new cRoundcvar_rounds

public plugin_init() {
    
register_plugin("Auto Cvars In X Round""1.0""Nimeni")

    
register_logevent("roundStart"2"1=Round_Start")
    
cvar_rounds register_cvar("amx_cvars_round""3")
}

public 
roundStart() {
    new 
rounds get_pcvar_num(cvar_rounds)
    
cRound++
    if(
cRound == rounds) {
        
server_cmd "mp_autoteambalance 1" );
        
server_cmd "mp_limitteams 1" );
        
server_cmd "sv_unlag 1" );
        
client_print 0print_chat"setting mp_autoteambalance, mp_limitteams and sv_unlag to 1" );
    }


is it good or not? (it has no errors on compiling)

xDrugz 01-03-2013 17:59

Re: auto cvar on x round
 
Test your plugin first.
We couldn't say anything.

fysiks 01-03-2013 19:59

Re: auto cvar on x round
 
So, does it work? You should already know the answer when posting.


All times are GMT -4. The time now is 13:31.

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