22.02.2011, 16:32
Hello. I have /aod script like this, but it doesen't make dot on minimap where i am. Can someone teach me to do it, when i write /aod it will say i'm admin on duty and it will make dot on minimap, if i write it again, it says i'm not admin on duty and removes dot from minimap.
pawn Код:
if(strcmp(cmd, "/aod", true) == 0)
{
if(PlayerInfo[playerid][pAdmin] >= 1)
{
new faction = PlayerInfo[playerid][pFaction];
if(AdminDuty[playerid] == 1)
{
format(string, sizeof(string), "[Admin:] %s (ID:%d) is now off duty", GetPlayerNameEx(playerid),playerid);
SendClientMessageToAll(COLOR_ADMINDUTY,string);
AdminDuty[playerid] = 0;
SetPlayerHealth(playerid,100);
SetPlayerArmour(playerid,0);
if(PlayerInfo[playerid][pFaction] != 255)
{
if(DynamicFactions[faction][fUseColor])
{
SetPlayerToFactionColor(playerid);
}
else
{
SetPlayerColor(playerid,COLOR_CIVILIAN);
}
}
else
{
SetPlayerColor(playerid,COLOR_CIVILIAN);
}
}
else
{
format(string, sizeof(string), "[Admin:] %s (ID:%d) is now admin on duty", GetPlayerNameEx(playerid),playerid);
SendClientMessageToAll(COLOR_ADMINDUTY,string);
AdminDuty[playerid] = 1;
SetPlayerColor(playerid,COLOR_ADMINDUTY);
SetPlayerHealth(playerid,999);
SetPlayerArmour(playerid,999);
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "[Viga:] You are not admin");
}
return 1;
}