AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Performing an action on a player after few rounds (https://forums.alliedmods.net/showthread.php?t=86947)

soak 03-04-2009 17:19

Performing an action on a player after few rounds
 
Hello everybody, I was wondering how the script should look to implement an action in a few rounds.
For example: a player enters the server, after ten rounds server performs a command on that player. Thanks in advance!

Owyn 03-04-2009 17:26

Re: Performing an action on a player after few rounds
 
event roundEnd, hook it and add one point to player, when player has "few" points - execute command

AntiBots 03-04-2009 17:33

Re: Performing an action on a player after few rounds
 
PHP Code:

#include <amxmodx>

new contador[33]

public 
plugin_init() 
{
    
register_logevent("new_round_start"2"1=Round_Start")
}

public 
client_connect(id)
    
contador[id] = 0

public new_round_start(id)
{
    for( new 
1<= 32i++)
    {
        if( 
is_user_alive(id) )
        {
            
contador[id]++
            
            if( 
contador[id] == 10 )
            {
                
// Here do something
            
}
        }
    }
    
    return 
PLUGIN_CONTINUE




All times are GMT -4. The time now is 17:08.

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