SetPlayerMarkerForPlayer isn't working correctly
#1

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(playeridparams[])
{
     
//previous blabla
     
for(new 0MAX_PLAYERSi++)
     {
        if(
GetPlayerWantedLevel(i) >= 1)
        {
            
SetPlayerMarkerForPlayer(playeridi0xFF0000FF);
        }
     }
     return 
1;

Any ideas?

Thanks for your help!
Reply
#2

https://sampwiki.blast.hk/wiki/SetPlayerMarkerForPlayer
Reply
#3

The red marker doesn't appear?
Reply
#4

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
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)