12.05.2014, 12:04
To save it for next time,
pawn Код:
CMD:aduty(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] < 1) return 0;
if(PlayerInfo[playerid][pADuty] == 0)
{
format(PlayerInfo[playerid][pNormalName], 128, "%s", GetName(playerid));
PlayerInfo[playerid][pADuty] = 1;
SetPlayerName(playerid, PlayerInfo[playerid][pAName]);
SendClientMessage(playerid, -1, "You are now on a-duty.");
}
else
{
PlayerInfo[playerid][pADuty] = 0;
SendClientMessage(playerid, -1, "You have gone off a-duty.");
SetPlayerName(playerid, PlayerInfo[playerid][pNormalName]);
}
return 1;
}
CMD:setaname(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] < 1) return 0;
if(isnull(params)) return SendClientMessage(playerid, -1, "SYNTAX: /setaname [name]");
format(PlayerInfo[playerid][pAdminName], 128, "%s", params);
new string[128];
format(string, sizeof(string), "You have set your admin name to %s.", params);
SendClientMessage(playerid,-1,string);
return 1;
}