[REQUEST] Reserved slot

Is there a way to do a ressource to have reserved slot on a Five M server?
Maybe when an “admin” connect to the server it kicks someone or there is plus one slot, if possible ?


1 Like

Nobody can tell me if it’s possible?
Thanks in advance :slight_smile:

I guess you could do reserved slot by scripting this (this an algorithm not a script)

On connection
If (NbOfPlayer > NbPlayerMax-NbSlot and UserPermission < Admin) then
Kick player conjecting
Allow player to connect

And for kicking random player on admin connection

On connection
If (NbOfPlayer == NbPlayerMax and UserPermission == Admin) then
While UserPermission>=admin
Kick player


Thanks, I’ll try! :wink:

Any update ? I would be interrested !

I would be interrested too !

Any word on this working?

No body can do this ?

Good afternoon sirs. I’m developing changes in vrp / base.lua for when the server is full 32/32 the admin can log in. For this I have created a part of the code that checks in a field of a table in mysql whether it is a priority or not. However I am having great difficulty in generating a list of players to be able to take a random and give a dropplayer. If anyone can help me, I just need to understand how to get the list of players to select one and give the dropplayer. There I share the code.

You could just generate a random number between 1 and 32 and grab player identifier from that number. Then kick that client
Edit: you could get more advanced if you don’t want to kick an admin, you can run a mysql check before kicking then run again if the random was a admin

Many thanks to everyone who somehow helped me. The functionality is ready and running with VRP.

and no is posible you share this¿?¿?

If this isn’t released already, I can whip up a script for this in a few hours…

waiting for this script