SA-MP Forums Archive
Reserved slot? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Other (https://sampforum.blast.hk/forumdisplay.php?fid=7)
+--- Forum: Everything and Nothing (https://sampforum.blast.hk/forumdisplay.php?fid=23)
+--- Thread: Reserved slot? (/showthread.php?tid=394153)



Reserved slot? - Kep - 21.11.2012

Hello i've a question
I own a CNR server, during evening we get huge traffic there and most of the time it gets filled up and i cant play
So is there a way to reserve a slot for my name, dont suggest me to kick players and join, thats rude, is there a way?


Re: Reserved slot? - Zircon-Hosting - 21.11.2012

Quote:
https://sampforum.blast.hk/showthread.php?tid=90978
Edit: Links were dead.


Re: Reserved slot? - iTorran - 21.11.2012

You could always keep a NPC on there and kick it when you want to join..
Probably not the best way and not entirely sure it would even work


Re: Reserved slot? - Danny - 21.11.2012

Код:
public OnPlayerConnect(playerid)
{
        new ip[16];
        GetPlayerIp(playerid, ip, 16);
        if(playerid == MAX_PLAYERS-1 && strcmp(ip, "[your ip here]", true))
        {
                Kick(playerid);
         }
         return 1;
}
Maybe I missed something here, but I guess this is the basic way to do something like this.


Re: Reserved slot? - Kyle - 21.11.2012

Quote:
Originally Posted by -Danny-
Посмотреть сообщение
Код:
public OnPlayerConnect(playerid)
{
        new ip[16];
        GetPlayerIp(playerid, ip, 16);
        if(playerid == MAX_PLAYERS-1 && strcmp(ip, "[your ip here]", true))
        {
                Kick(playerid);
         }
         return 1;
}
Maybe I missed something here, but I guess this is the basic way to do something like this.
- "dont suggest me to kick players and join, thats rude, is there a way?"

Ontopic: No. Not without kicking players.


Re: Reserved slot? - linuxthefish - 21.11.2012

Quote:
Originally Posted by iTorran
Посмотреть сообщение
You could always keep a NPC on there and kick it when you want to join..
Probably not the best way and not entirely sure it would even work
This is actually the best way to do it, you could controll your bot via a web interface or IRC etc.


Re: Reserved slot? - Makaveli93 - 21.11.2012

Increase the slots if you don't want to kick players. Otherwise, either use a bot that would save you a slot, or use the code snippet Danny posted above.


Re: Reserved slot? - ScRaT - 21.11.2012

Or you could timeout them instead of kick....It's less rude i guess
https://sampforum.blast.hk/showthread.php?tid=178575


Re: Reserved slot? - iGetty - 21.11.2012

http://pastebin.com/f686d5f7a - that's taken off of the first post, didn't realize.