Admin slot
#10

Quote:
Originally Posted by FireCat
Посмотреть сообщение
You mean like convoy trucking?
If yes:
pawn Код:
new connectedplayers;
public OnPlayerConnected(playerid)
{
    if(connectedplayers == GetMaxPlayers()-2) // for 2 slots
    {  
        if(YOURADMINVARHERE < the min level the player need to have)
        {
            Kick(playerid);
            SendClientMessage(playerid,color,"Last 2 slots are for admins");
            return 1;
        }
    }
    connectedplayers++;
    return 1;
}

public OnPlayerDisconnect(playerid,reason)
{
    connectedplayers--;
    return 1;
}
Minor thing; You should send client message before kicking, or else the player won't see the message.
Reply


Messages In This Thread
Admin slot - by Trucker[UK] - 03.08.2011, 09:19
Re: Admin slot - by FireCat - 03.08.2011, 10:28
Re: Admin slot - by Trucker[UK] - 03.08.2011, 10:30
Re: Admin slot - by Guest3598475934857938411 - 03.08.2011, 11:12
Re: Admin slot - by Trucker[UK] - 04.08.2011, 14:53
Re: Admin slot - by Dudits - 04.08.2011, 14:58
Re: Admin slot - by Trucker[UK] - 04.08.2011, 15:01
Re: Admin slot - by Trucker[UK] - 06.08.2011, 20:00
Re: Admin slot - by KoczkaHUN - 06.08.2011, 20:04
Re: Admin slot - by sim_sima - 22.11.2011, 16:12

Forum Jump:


Users browsing this thread: 2 Guest(s)