02.10.2009, 01:02
Quote:
Originally Posted by L30
Alright, well when I do /makeadmin it all is well, until server is restarted, so is there away to make it like this?
dUserSetINT(PlayerName(playerid)).("score",GetPlay erScore(playerid)); SetPlayerMoney(playerid,dUserINT(PlayerName(player id)).("money")); But with Admin. So it save the players Admin level on disconnect and loads on login. |
pawn Код:
stock SaveMe(playerid)
{
// Add all your stuff to save here including:
dUserSetINT(PlayerName(playerid)).("Admin",PlayerInfo[playerid][pAdmin]);
}
Also, on your register command I'm assuming you are creating "Admin" in the file.
So after you've saved the player, log them in with their stuff next time with a similar function.
pawn Код:
stock Login(playerid)
{
PlayerInfo[playerid][pAdmin] = (dUserINT(pNick(playerid)).("Admin"));
// Rest of their stuff here.
}
Obviously you will have to change it all to fit your script, that's just an example.