Updating SetPlayerMarkerForPlayer
#1

Hi,

Can anyone help me with SetPlayerMarkerForPlayer function? I currently a timer running to update the marker on radar. Like:
pawn Код:
//OnPlayerSpawn: SetTimerEx("Police_CheckWanted", 1000, true, "d", playerid);
forward Police_CheckWanted(playerid);
public Police_CheckWanted(playerid)
{
    foreach(Player, i)
    {
        if (GetPlayerWantedLevel(i) > 0)
            SetPlayerMarkerForPlayer(playerid, i, RED);
        else
        {
            switch (pInfo[i][Class])
            {
                case TRUCKER: SetPlayerMarkerForPlayer(playerid, i, COLOR_TRUCKER);
                case PILOT: SetPlayerMarkerForPlayer(playerid, i, COLOR_PILOT);
                case POLICE: SetPlayerMarkerForPlayer(playerid, i, COLOR_POLICE);
                case MECHANIC: SetPlayerMarkerForPlayer(playerid, i, COLOR_MECHANIC);
            }
        }
    }
}
And its kinda buggy like if i set another marker, the marker is flashing with 2 or 3 colors. Are there any ways that i can update it without having to set a timer? Or i must use a timer to keep updating it on radar?
Reply


Messages In This Thread
Updating SetPlayerMarkerForPlayer - by iOxide - 07.09.2014, 12:14
Re: Updating SetPlayerMarkerForPlayer - by iOxide - 08.09.2014, 16:05
Re: Updating SetPlayerMarkerForPlayer - by Pottus - 08.09.2014, 16:12
Re: Updating SetPlayerMarkerForPlayer - by DavidBilla - 08.09.2014, 16:13
Re: Updating SetPlayerMarkerForPlayer - by iOxide - 08.09.2014, 16:57

Forum Jump:


Users browsing this thread: 2 Guest(s)