Raised This Month: $ Target: $400
 0% 

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


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Mofforg
Senior Member
Join Date: Aug 2010
Location: Moscow, Russia
Old 06-02-2013 , 07:26   Trying to make simple plugin to kick HLTV if server is full
Reply With Quote #1

Hello.


I have an AFK kicker on my server, but it never affects HLTV. I have 2 HLTV's in my server (2 upstreams for better perfomance) and i want them to go off if player needs a slot. So i think it would be better to make separate plugin for this.

So basically i need a plugin which will make a check on "public client_putinserver": if players == 32 then kick one HLTV if there is any in the server. If no HLTV on server then just do nothing. 3 sec delay is needed for my ban system to kick players if he(she) is banned. [so players would get disconnected and there will not needed to kick hltv]

The main problem, that i need it to be done silently. HLTV is auto reconnected, so if this message would be shows then there would be too much flood. I need it to be done without any messages (but other admin's kicks and bans should continue to be showed). How can i kick silently? Also i have no idea how to simply detect all hltvs currently in server.

Could someone help with this?

I've started...:
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 silently (no messages in chat) - how can i do this?



Last edited by Mofforg; 06-02-2013 at 07:27.
Mofforg is offline
Send a message via ICQ to Mofforg Send a message via Skype™ to Mofforg
 


Thread Tools
Display Modes

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