Raised This Month: $ Target: $400
 0% 

Trying to make simple plugin to kick HLTV if server is full


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Backstabnoob
BANNED
Join Date: Feb 2009
Location: Iwotadai Dorm
Old 06-02-2013 , 08:01   Re: Trying to make simple plugin to kick HLTV if server is full
Reply With Quote #1

is_user_hltv( )
Backstabnoob is offline
Mofforg
Senior Member
Join Date: Aug 2010
Location: Moscow, Russia
Old 06-02-2013 , 08:27   Re: Trying to make simple plugin to kick HLTV if server is full
Reply With Quote #2

Quote:
Originally Posted by Backstabnoob View Post
is_user_hltv( )
The check applying is not for this player. On the 'check' function i need to check all current users on being hltv (is_user_hltv), how can i do it on 'all players' not for this player, which connected?
Mofforg is offline
Send a message via ICQ to Mofforg Send a message via Skype™ to Mofforg
Unkolix
Veteran Member
Join Date: Sep 2012
Old 06-02-2013 , 08:39   Re: Trying to make simple plugin to kick HLTV if server is full
Reply With Quote #3

Quote:
Originally Posted by Mofforg View Post
The check applying is not for this player. On the 'check' function i need to check all current users on being hltv (is_user_hltv), how can i do it on 'all players' not for this player, which connected?
Use get players and then is_user_hltv and kick him.
Unkolix is offline
Mofforg
Senior Member
Join Date: Aug 2010
Location: Moscow, Russia
Old 06-02-2013 , 10:31   Re: Trying to make simple plugin to kick HLTV if server is full
Reply With Quote #4

Quote:
Originally Posted by Unkolix View Post
Use get players and then is_user_hltv and kick him.
Thanks, but i am confused how to use it....

PHP Code:
public client_putinserver(id)
{
    
set_task(3.0"check"id)
}

public 
check(id)
{
    if(!
is_user_connected(id)) return
    if (
get_playersnum(1) != 32 ) return
    
// Here we need to detect all HLTV's in server and kick one of them - how can i do this?
    
get_playersplayersnum"cd")
    if( 
is_user_hltvClient ) ) server_cmd("amx_kick #%d"get_user_userid(Selected))    


Last edited by Mofforg; 06-02-2013 at 10:31.
Mofforg is offline
Send a message via ICQ to Mofforg Send a message via Skype™ to Mofforg
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 16:25.


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