Free slot & Redirection - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Free slot & Redirection (
/showthread.php?tid=214616)
Free slot & Redirection -
Pooh7 - 21.01.2011
Hi
Is it possible to make reserved slots for players? For example: Make a file with list of players what can join to server anytime whether is server full or not. If is server full, to select random playerid and kick him to free slot?
Is it possible to make redirection from server to server?
When player connect, to disconnect him and connect to another server?
I need this because i'm moving to another hosting, so I don't want to lose players what don't know the new server IP.
Sorry for my bad English!
Re: Free slot & Redirection -
Joe Staff - 21.01.2011
To make a reserved slot you'd have to check a connecting player's name and IP, problem is if the person who your reserving for's IP changes, then you'll have to change your script
You can't redirect a person to another server, what you can do is change the name of your old server to something like
NEW IP: 127.0.0.1
and then lock your old server with a password
Re: Free slot & Redirection -
Mauzen - 21.01.2011
You could use the dns plugin and e.g. no-ip.com for the reserved players to dynamically get the reserved players' ips without changing the script.
Resolve the ip from the no-ip.com dns and just compare it with the ip of the connecting player. If the server is full and the ip is reserved, kick one player.
https://sampforum.blast.hk/showthread.php?tid=75605
(reserved players register a no-ip.com dns address that is stored in your database/user files)