Raised This Month: $ Target: $400
 0% 

Reserve slot


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
striker07
Veteran Member
Join Date: Mar 2012
Location: Solar System/Earth/Belgi
Old 08-15-2012 , 15:30   Re: Reserve slot
Reply With Quote #4

PHP Code:
#include <amxmodx>
#include <amxmisc>
 
new g_aSlot 1
 
public plugin_init()
{
    
register_plugin("AmxBans Admin Base""2.5""Sutar")
}
 
public 
client_authorized(id)
{
    if(!
access(idADMIN_RESERVATION))
    {
        if(
get_playersnum(1) >= (get_maxplayers() - g_aSlot))
        {
            
server_cmd("kick #%d Извините, нет места для игроков!"get_user_userid(id))           
            return 
PLUGIN_HANDLED
        
}
    }
    return 
PLUGIN_CONTINUE

try changing plugin continue to handled, i think that should do it
Quote:
Possible error in the:
Code:
get_playersnum(1)
-->
Code:
get_playersnum()
get_playersnum(1) will return also players connecting to the server
get_playersnum() not
__________________

Working on:
[CSGO/CSS] Mmorpg - an extensive XP/level modulair platform
Progress: [♣♣♣♣♣♣♣|♣♣♣]

Last edited by striker07; 08-15-2012 at 15:35.
striker07 is offline
 



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 05:41.


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