AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   Use once every 7 rounds (https://forums.alliedmods.net/showthread.php?t=232146)

OnePL 12-26-2013 08:34

Use once every 7 rounds
 
Hello

How to do to be able to use the variable X every 7 rounds?

PHP Code:

#include <amxmodx>

new xrounds;

public 
plugin_init() {
    
register_clcmd("say /test""use");

    
register_logevent("RoundEnd"2"1=Round_End");
    
register_event("TextMsg""RestartGame""a""2&#Game_w");
    
register_event("TextMsg""RestartContin""a""2&#Game_C");
}

public 
RestartGame() rounds 0;
public 
RestartContin() rounds = -1;
public 
RoundEnd() rounds++;

public use(
id) {
    if(
?) {
        
client_print(id3"Can only be used once every 7 rounds!");
        return 
1;
    }
    
// code
    
return 0;




All times are GMT -4. The time now is 20:24.

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