• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Lua Vip System: problem with name

1268995

Member
Joined
Sep 9, 2010
Messages
422
Reaction score
13
Hello. I use a VIP System that when players buys vip with command !buyvip, his name will be [VIP] "his name".

The code put [VIP] in data base in front of his name.

The problem is: In the dabase, his name will be [VIP] "name".
So a player can make anotther character with his name.

Example: player Limos bought VIP. His name in database = [VIP] Limos.
THEN a NEW PLAYER CAN CREATE a character with name Limos, because there is no other Limos in database, but there is [VIP] Limos.

And than i ask: when the vip of [VIP] Limos end, will have 2 players with Limos name...

And now? There is a solution for that?
 
The solution would be to keep his name normal in the database but when logging in, tag [vip] onto his name. The problem is that if you do this, when you right click to pm/add vip/maybe even exiva? It will attempt to add "[vip] name" instead of "name"

Edit:
On second thought, there may be a way to solve the exiva thing but anything that is client-sided is going to get confused and think the name includes [vip].
 
If you want to keep that feature you can edit the script to work like @Xagul just said:

The solution would be to keep his name normal in the database but when logging in, tag [vip] onto his name. The problem is that if you do this, when you right click to pm/add vip/maybe even exiva? It will attempt to add "[vip] name" instead of "name"

Or you can edit the query in your script for it to namelock the previous player name so none else can use it while the player is VIP.
 
namelock the previous player name so none else can use it while the player is VIP.
Not sure what server version he is using but in the older servers (8.6~) by default namelock does not prevent the name from being used again once the server restarts.
 
The solution would be to keep his name normal in the database but when logging in, tag [vip] onto his name. The problem is that if you do this, when you right click to pm/add vip/maybe even exiva? It will attempt to add "[vip] name" instead of "name"

How can i do that? Nice idea... I am using 8.60.
Or you can edit the query in your script for it to namelock the previous player name so none else can use it while the player is VIP.

How?
 
Or you can edit the query in your script for it to namelock the previous player name so none else can use it while the player is VIP.

How can i edit the queery in my script for it to namelock the previous player name so none else can use it while the player is VIP ?
 
Back
Top