SetPlayerMarkerForPlayer isn't working correctly - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: SetPlayerMarkerForPlayer isn't working correctly (
/showthread.php?tid=655605)
[SOLVED] SetPlayerMarkerForPlayer isn't working correctly -
Adamoneoone - 25.06.2018
Hey guys i'm trying to setup a police system. When a player has wanted level, his name and map icons should turn red.
So far I have this code, but it isn't working.
PHP код:
CMD:police(playerid, params[])
{
//previous blabla
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(GetPlayerWantedLevel(i) >= 1)
{
SetPlayerMarkerForPlayer(playerid, i, 0xFF0000FF);
}
}
return 1;
}
Any ideas
?
Thanks for your help!
Re: SetPlayerMarkerForPlayer isn't working correctly -
SubGames - 25.06.2018
https://sampwiki.blast.hk/wiki/SetPlayerMarkerForPlayer
Re: SetPlayerMarkerForPlayer isn't working correctly -
Beckett - 25.06.2018
The red marker doesn't appear?
Re: SetPlayerMarkerForPlayer isn't working correctly -
Adamoneoone - 25.06.2018
Quote:
Originally Posted by SubGames
|
What's the point of redirecting me over there?
Quote:
Originally Posted by DaniceMcHarley
The red marker doesn't appear?
|
Yep, that's the problem, i still got the original color.
// EDIT: Something weird happens, when I do /police on PC A, the PC A doesn't see any color change, but PC B's player color changes. However, when PC B writes in the chat, PC A doesn't see the color change.
// UPDATE: Just Put the SetPlayerMarkerForPlayer in another command, now the color changing is working fine, however, on the wanted player's screen, his color changes when he types text.
// UPDATE: PROBLEM SOLVED. For some reason, the SetPlayerColor in the OnPlayerSpawn was not working and messing things up. Thanks for your help guys