08.02.2013, 00:38
Hello, I am currently using a zgaming script which i am slowy almost redoing the whole script with a team, But i've found a problem which i can't seem to locate when you /aduty a player mapicon shows up and it's ID is 99 but we tried and i think almost removed the map icon and this is how it looks now
Код:
CMD:aduty(playerid, params[])
{
new string[128], file[32];
if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
if(!aDuty[playerid])
{
format(string, sizeof(string), "AdmWarn: %s has gone on admin duty.", RPN(playerid));
SendAdminMessage(COLOR_GREEN, 1, string);
aDuty[playerid] = 1;
GetPlayerIp(playerid, PlayerInfo[playerid][pIP], 16);
format(string, sizeof(string), "%s", RPALN(playerid));
SetPlayerArmour(playerid, 9999999);
SetPlayerHealth(playerid, 9999999);
SetPlayerColor(playerid,0xAA3333FF);
}
else
{
if(Spec[playerid]) return SendClientMessage(playerid, COLOR_GREY, "You can't go off admin duty while spectating someone.");
format(file, sizeof(file), "users/%s.ini",RPNU(playerid));
aDuty[playerid] = 0;
format(file, sizeof(file), "users/%s.ini", RPNU(playerid));
format(string, sizeof(string), "AdmWarn: %s has gone off admin duty.", RPN(playerid));
SendAdminMessage(COLOR_DARKRED, 1, string);
SetPlayerArmour(playerid, 0);
SetPlayerHealth(playerid, 100);
//Delete3DTextLabel(aDutyText[playerid]);
SetPlayerColor(playerid, TRANSPARENT_WHITE);
}
return 1;
}


