09.03.2017, 20:08
hey so I have this command that should when player type the command to be view on the map all the players can see him but it isn't workin good here is the script
PHP код:
CMD:aduty(playerid, params[])
{
if(adlvl[playerid]<1) return 0;
new pname[64], str[150];
GetPlayerName(playerid, pname, sizeof(pname));
for(new i=0; i< MAX_PLAYERS; i++)
{
if(aDuty[playerid]==0)
{
SetPlayerMarkerForPlayer(playerid, i, (GetPlayerColor(playerid)));
format(str,sizeof(str),"Admin[%s] Is Now [ON] Duty", pname);
SendClientMessageToAll(COLOR_GREEN,str);
aDuty[playerid]=1;
return 1;
}
if(aDuty[playerid]==1)
{
SetPlayerMarkerForPlayer(playerid, i, 00);
format(str,sizeof(str),"Admin[%s] Is Now [OFF] Duty", pname);
SendClientMessageToAll(COLOR_GREEN,str);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
aDuty[playerid]=0;
return 1;
}
return 1;
}
return 1;
}