AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Ayuda. ready or kick (https://forums.alliedmods.net/showthread.php?t=172383)

jg_20 11-19-2011 17:21

Ayuda. ready or kick
 
Hi all. I have a code that gives kick to the player not to write. Ready at a certain time to enter the server. Well I want to do is register the code also if a player is in a state. NotReady if the server so the kick. But if the stands. Ready not kick.
This plugin would be for YAP PUG mode. If you could help me thank you very much. (Sorry for my bad English) See the code.

PHP Code:

#include <amxmodx>

#define MAX_PLAYERS 32
#define TASK_TIME    60.0 // 1 minuto

new bool:IsReady[MAX_PLAYERS 1]

public 
plugin_init()
{
    
register_clcmd("say .ready""hsay_sready")
    
register_clcmd("say_team .ready""hsay_sready")
}

public 
client_putinserver(id)
{
    
set_task(TASK_TIME"task_kickplayer"id)
}

public 
hsay_sready(id)
{
    
IsReady[id] = true
    remove_task
(id)
}

public 
client_disconnect(id)
{
    
IsReady[id] = false
    remove_task
(id)
}

public 
task_kickplayer(id)
{
    
server_cmd"kick #%i ^"You aren't ready^"", get_user_userid(id) )




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

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