09.07.2011, 09:52
I have this:
But how to: When he quits the variable saves. I searched but couldn't find anything good.
pawn Код:
new admin[MAX_PLAYERS];
pawn Код:
public OnPlayerConnect(playerid)
{
admin[playerid] = 0;
}
pawn Код:
if (strcmp("/makemeadmin", cmdtext, true) == 0)
{
if (IsPlayerAdmin(playerid))
{
if (admin[playerid] == 1)
{
SendClientMessage(playerid,COLOR_RED,"You are already an admin!");
}
else
{
admin[playerid] = 1;
SendClientMessage(playerid,COLOR_GREEN,"You became an admin!");
}
}
else
{
SendClientMessage(playerid,COLOR_RED,"You must be logged on in RCON!");
}
}