SA-MP Forums Archive
Transferring admin/vip powers - 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)
+--- Thread: Transferring admin/vip powers (/showthread.php?tid=295749)



Transferring admin/vip powers - Roperr - 07.11.2011

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


Re: Transferring admin/vip powers - KosmasRego - 07.11.2011

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


Re: Transferring admin/vip powers - Roperr - 07.11.2011

No not at all. Not giving any errors.


Re: Transferring admin/vip powers - KosmasRego - 07.11.2011

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


Re: Transferring admin/vip powers - Roperr - 07.11.2011

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.


Re: Transferring admin/vip powers - KosmasRego - 07.11.2011

You can create a Pinfo saving admin rank OnPlayerDisconnect :P


Re: Transferring admin/vip powers - Roperr - 07.11.2011

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?


Re: Transferring admin/vip powers - KosmasRego - 07.11.2011

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


Re: Transferring admin/vip powers - Roperr - 07.11.2011

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");


Re: Transferring admin/vip powers - KosmasRego - 07.11.2011

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