08.01.2015, 18:22
What is the problem, you just want the command for administrators only rcon ?. which variable is the administrator of his script ?.
pawn Код:
CMD:aduty(playerid,params[])
{
if(pInfo[playerid][pLevel] >= 1)
{
new skin[MAX_PLAYERS];
if(OnDuty[playerid] == 0)
{
skin[playerid] = GetPlayerSkin(playerid);
SetPlayerSkin(playerid, 217);
SetPlayerHealth(playerid,100000);
SetPlayerColor(playerid, 0x01FCFFFF);
OnDuty[playerid] = 1;
}
else if(OnDuty[playerid] == 1)
{
SetPlayerSkin(playerid, skin[playerid]);
SetPlayerHealth(playerid, 100);
SetPlayerColor(playerid 0xFFFFFFFF);
OnDuty[playerid] = 0;
}
}
else
{
SendClientMessage(playerid, -1, "You are not administrator.");
}
return true;
}