24.03.2013, 19:19
Ops sorry lol, forgot to paste the line in;
Here is the aduty command; the error occurs at the commented out line near the bottom:
Here is the aduty command; the error occurs at the commented out line near the bottom:
pawn Код:
CMD:aduty(playerid, params[])
{
new playername[MAX_PLAYER_NAME+1], string[24+MAX_PLAYER_NAME+1];
GetPlayerName(playerid, playername, sizeof(playername));
if(!PlayerInfo[playerid][pAdmin])
{
return SendClientMessage(playerid, -1, "You are not an admin.");
}
if(PlayerInfo[playerid][OnDuty])
{
SetPlayerName(playerid, PlayerInfo[playerid][pName]);
PlayerInfo[playerid][OnDuty] = false;
SendClientMessage(playerid,COLOR_YELLOW, "You have gone OFF administrator duty!");
}
else
{
if(!PlayerInfo[playerid][HasSetAdminName])
{
return SendClientMessage(playerid, -1, "You haven't set an admin name yet.");
}
//GetPlayerName(playerid, PlayerInfo[playerid][pName], sizeof(PlayerInfo[playerid][pName]));
SetPlayerName(playerid, PlayerInfo[playerid][aName]);
PlayerInfo[playerid][OnDuty] = true;
SendClientMessage(playerid,COLOR_YELLOW, "You have gone ON administrator duty!");
}
return 1;
}