Raised This Month: $ Target: $400
 0% 

Performing an action on a player after few rounds


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
soak
Junior Member
Join Date: Jan 2008
Old 03-04-2009 , 17:19   Performing an action on a player after few rounds
Reply With Quote #1

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!
soak is offline
Owyn
Veteran Member
Join Date: Nov 2007
Old 03-04-2009 , 17:26   Re: Performing an action on a player after few rounds
Reply With Quote #2

event roundEnd, hook it and add one point to player, when player has "few" points - execute command
Owyn is offline
Send a message via ICQ to Owyn
AntiBots
Veteran Member
Join Date: May 2008
Location: Brazil
Old 03-04-2009 , 17:33   Re: Performing an action on a player after few rounds
Reply With Quote #3

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

__________________
AntiBots is offline
Send a message via ICQ to AntiBots Send a message via MSN to AntiBots Send a message via Skype™ to AntiBots
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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