Player Markers
#4

if i was u i would on the command that sets aDuty[playerid] == 1 write
pawn Код:
new admincolor;
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/adutyon", true))
    {
        if(IsPlayerAdmin(playerid) == 0) return SendClientMessage(playerid,COLOR_RED,"You can't use this command !");
        aDuty[playerid] == 1
        admincolor = GetPlayerColor(playerid);
        SetPlayerColor(playerid,COLOR_LIME);
        return 1;
    }
    if(!strcmp(cmdtext, "/adutyoff", true))
    {
         if(IsPlayerAdmin(playerid) == 0) return SendClientMessage(playerid,COLOR_RED,"You can't use this command !");
        aDuty[playerid] == 0
        SetPlayerColor(playerid,admincolor);
        return 1;
    }
    return 0;
}
for the on radar thing if u want that all players don't appear on the radar but only if they have aDuty[playerid] == 1
then
pawn Код:
#define invisible 0xFFFFFF00

public OnPlayerUpdate(playerid)
{
    for(new i=0; i<MAXPLAYERS; i++)
    {
     if(aDuty[playerid] == 0){SetPlayerMarkerForPlayer(playerid, i, GetPlayerColor(playerid) & invisible);}
     else{SetPlayerMarkerForPlayer(playerid, i, COLOR_LIME & COLOR_LIME);}
    }
     return 1;
}
Reply


Messages In This Thread
Player Markers - by WinterAce - 14.07.2012, 18:54
Re: Player Markers - by RedJohn - 14.07.2012, 19:01
Re: Player Markers - by WinterAce - 14.07.2012, 19:18
Re: Player Markers - by Opah - 14.07.2012, 19:51
Re: Player Markers - by SuperViper - 14.07.2012, 20:03
Re: Player Markers - by TheArcher - 14.07.2012, 21:05
[No subject] - by WinterAce - 14.07.2012, 21:41
Re: Player Markers - by RedJohn - 15.07.2012, 07:59

Forum Jump:


Users browsing this thread: 3 Guest(s)