10.03.2011, 18:00
Which ini system you use? Dini, mysql etc..
And the IsPlayerAdmin is for RCON use, do you want players/admins to log in the RCON and use the cmds? I don't recommend that.
But if you use dini, you can do this.
This under OnPlayerDisconnect
Something like this under your register cmd/dialog
Then add this to your CMDS
But afterall it is you who decide if it should be rcon or this.
And the IsPlayerAdmin is for RCON use, do you want players/admins to log in the RCON and use the cmds? I don't recommend that.
But if you use dini, you can do this.
pawn Код:
enum pInfo
{
AdminLevel,
};
pawn Код:
dini_IntSet(file, "AdminLevel",PlayerInfo[playerid][AdminLevel]); // saves the admin level
pawn Код:
dini_Create(file); // creates file
dini_IntSet(file, "AdminLevel",PlayerInfo[playerid][AdminLevel] = 0);
pawn Код:
if(PlayerInfo[playerid][AdminLevel] < 1) return 0; // If player is admin level 1 and above, this command will be executed, otherwise it will return "SERVER: Unknown command.
