Raised This Month: $ Target: $400
 0% 

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


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
tcPane
Senior Member
Join Date: Sep 2010
Old 04-16-2012 , 04:12   If you don't choose a team until 2 minutes ==> kick/disconnect
Reply With Quote #1

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

Last edited by tcPane; 04-16-2012 at 04:14.
tcPane is offline
claudiuhks
Yam Inside®™℠
Join Date: Jan 2010
Location: Living Randomly
Old 04-16-2012 , 04:22   Re: If you don't choose a team until 2 minutes ==> kick/disconnect
Reply With Quote #2

mp_autokick 1
claudiuhks is offline
Send a message via MSN to claudiuhks Send a message via Yahoo to claudiuhks Send a message via Skype™ to claudiuhks
rak
Veteran Member
Join Date: Oct 2011
Location: banned country
Old 04-16-2012 , 07:43   Re: If you don't choose a team until 2 minutes ==> kick/disconnect
Reply With Quote #3

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)) 
__________________

www.amxmodx-es.com

Steam: Luchokoldo

Last edited by rak; 04-16-2012 at 07:52.
rak is offline
Send a message via MSN to rak Send a message via Skype™ to rak
Devil259
Veteran Member
Join Date: Dec 2009
Location: France (59)
Old 04-16-2012 , 09:16   Re: If you don't choose a team until 2 minutes ==> kick/disconnect
Reply With Quote #4

There is also a client cvar, named cl_timeout, which kick the player after X seconds of inactivity.
__________________
You can do anything you set your mind to, man.

Devil259 is offline
rak
Veteran Member
Join Date: Oct 2011
Location: banned country
Old 04-16-2012 , 09:22   Re: If you don't choose a team until 2 minutes ==> kick/disconnect
Reply With Quote #5

Quote:
Originally Posted by Devil259 View Post
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
__________________

www.amxmodx-es.com

Steam: Luchokoldo

Last edited by rak; 04-16-2012 at 09:29.
rak is offline
Send a message via MSN to rak Send a message via Skype™ to rak
Devil259
Veteran Member
Join Date: Dec 2009
Location: France (59)
Old 04-16-2012 , 09:47   Re: If you don't choose a team until 2 minutes ==> kick/disconnect
Reply With Quote #6

Yes it is. I just said that to inform them.
__________________
You can do anything you set your mind to, man.

Devil259 is offline
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 07:51.


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