AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   If you don't choose a team until 2 minutes ==> kick/disconnect (https://forums.alliedmods.net/showthread.php?t=183012)

tcPane 04-16-2012 04:12

If you don't choose a team until 2 minutes ==> kick/disconnect
 
I want to make a plugin, who in new map, if you don't choose a team until 2 minutes ==> kick/disconnect.

claudiuhks 04-16-2012 04:22

Re: If you don't choose a team until 2 minutes ==> kick/disconnect
 
mp_autokick 1

rak 04-16-2012 07:43

Re: If you don't choose a team until 2 minutes ==> kick/disconnect
 
PHP Code:

#include <amxmodx>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "[R]ak"

const TASK_CHECK 2707

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_clcmd("joinclass""cmdJoinClass")
}

public 
client_putinserver(id)
    
set_task(120.0"Task_Check"id+TASK_CHECK)

public 
cmdJoinClass(id)
    
remove_task(id+TASK_CHECK)
    
public 
Task_Check(taskid)
    
server_cmd("kick #%d"get_user_userid(taskid-TASK_CHECK)) 


Devil259 04-16-2012 09:16

Re: If you don't choose a team until 2 minutes ==> kick/disconnect
 
There is also a client cvar, named cl_timeout, which kick the player after X seconds of inactivity.

rak 04-16-2012 09:22

Re: If you don't choose a team until 2 minutes ==> kick/disconnect
 
Quote:

Originally Posted by Devil259 (Post 1690390)
There is also a client cvar, named cl_timeout, which kick the player after X seconds of inactivity.

this command is a client-side? I suppose, you don't think use client_cmd xD

Devil259 04-16-2012 09:47

Re: If you don't choose a team until 2 minutes ==> kick/disconnect
 
Yes it is. I just said that to inform them.


All times are GMT -4. The time now is 07:51.

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