SHC//Sniper Posted September 2, 2011 Posted September 2, 2011 Dear lovely MTA developers, today big clans self-finance theirselves by receiving donations. I've heard many suggestions about something like reserved slots to special players. As far as I know there ain't any possibility to detect/identify a player who has failed connection to a full server. I suggest to extend the "onPlayerConnect" event with functions that make reserved slots realizable. So we need the possibility to use several functions before a player gets disconnect from a full server. "onPlayerConnect" when a player ATTEMPTS to join | v run some code before being disconnected from a full server like "kickPlayer(someAFKPlayer)" | v let the identified VIP player join the server using his "reserved slots" | v finish the event and the server is back full Kind regards Sniper New and active mtasa.com username: -ffs-Sniper!
JR10 Posted September 2, 2011 Posted September 2, 2011 Just get his serial, and check on onPlayerConnect. If there is one slot available, and his serial isn't the same as the VIP one, kick him. You would increase checking how many slots available, according to how many VIP players you got. Business System viewtopic.php?f=108&t=35797 Notepad++ Syntax Highlighting & Auto Completion viewtopic.php?f=91&t=76726 SQLite Tutorial viewtopic.php?f=148&t=38203
SHC//Sniper Posted September 3, 2011 Author Posted September 3, 2011 Yes, sure. The problem is that I don't know if the event is fired when a player attempts to connect to a FULL server. Normally this event is used for players that connect to a server with free slots. And always keeping a slot free would be annoying to people if they get kicked everytime they try to join a 31/32 server. New and active mtasa.com username: -ffs-Sniper!
diegofkda Posted September 3, 2011 Posted September 3, 2011 Use cancelEvent(). "Everything exists, because otherwise nothing would", Bob Marley, 2015.
SHC//Sniper Posted September 3, 2011 Author Posted September 3, 2011 Nah, that's not my point. I want to know if the "onPlayerConnect" event is fired when somebody wants to join a server that is full (32/32). I had no possibility to test it yet but I don't think so. New and active mtasa.com username: -ffs-Sniper!
diegofkda Posted September 3, 2011 Posted September 3, 2011 Start your local server with 1 player slot, then ask a friend to join your server, and see if it works or not (it must work). "Everything exists, because otherwise nothing would", Bob Marley, 2015.
darkdreamingdan Posted September 3, 2011 Posted September 3, 2011 So your request is to enable onPlayerConnect to be triggered when a player attempts to connect to a full server? It doesn't sound unreasonable, i suggest you post it on our bugtracker http://bugs.mtasa.com VCP FOREVER!
SHC//Sniper Posted September 3, 2011 Author Posted September 3, 2011 Exactly Talidan. Tested and it doesn't. Please make that possible soon! Edit: I will put this into the bugtracker. New and active mtasa.com username: -ffs-Sniper!
Recommended Posts