Transferring admin/vip powers
#1

So recently I've been having problems with my admin/vip system.
I have made my own which works pretty good. I use dini for saving inside files. I also made a /makeadmin and /givevip command.

The problem I am having is that I gave a few players admin powers, now somehow these powers are getting transferred into other player files, and allows them to be admin, when they never even got promoted.

And no, the admins I have set myself can't give other players admin powers since it's RCON operated.

I'd be really thankful if someone would help me out with this. I'm thinking this line causes these problems:
PlayerInfo[pID][AdminLevel] = alevel;

pID is the player that I'm promoting (first parameter)
alevel is the second parameter.

Thank you in advance. -Roperr
Reply
#2

Try checking the CMD if it has some errors or the Dini saving.
Reply
#3

No not at all. Not giving any errors.
Reply
#4

That problem happens when you restart the server or when the player you setted the rank on relogs or /q ?
Reply
#5

It didn't happen after a restart. It happens randomly. It could be when the player disconnects that the Admin level gets stuck to an ID? I've seen this kind of stuff before.
Reply
#6

You can create a Pinfo saving admin rank OnPlayerDisconnect :P
Reply
#7

I'm sorry, didn't quite understand what you meant with that.
The admin level is saving inside a file when a player disconnects.
What else do you have in mind?
Reply
#8

Hmmm maybe if a player connects do something like GetPlayerAlevel or something...
Reply
#9

When a player connets he is given a register dialog if it's his first time on the server, when he registers the server creates a file with all the neccessary things inside.
If a player has already been playing and just logins, it does this:
PlayerInfo[playerid][AdminLevel] = dini_Int(file, "Admin Level");
Reply
#10

I don't really know...Never had this problem before. Try re-making the script very carefully if you want...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)