Changing colors of players visible just for one?
#1

Hello community,

I am here turning on your with another question.

Is it possible to change colors of players, but these changes will be visible only for one player?

Eg. player with wanted level higher than 1 will get nick color change to red, but only players with pJob set on 3 (cops) will see it

For any ideas, i am thankful!
Reply
#2

Not sure But Maybe this?
https://sampwiki.blast.hk/wiki/SetPlayerMarkerForPlayer
Reply
#3

And do you think I should put it into OnPlayerUpdate or make a separated timer for it?

I mean for checking, what players are currently wanted and should be marked.
Reply
#4

Dont do much onplayerupdate. It can drasticly lagg your server if done wrong. Use a timer
Reply
#5

Just be hones, did I just do a complete BS or I made something, that could possibly work?

PHP код:
    for(new 0MAX_PLAYERSi++)
    {
        if(
PlayerInfo[i][pJob] == 1)
        {
            for(new 
0MAX_PLAYERSw++)
            {
                
wantedlevel GetPlayerWantedLevel(w);
                if(
wantedlevel 0)
                {
                    
SetPlayerMarkerForPlayeriw0xFF3900FF );
                }
            }
        }
    } 
loops players, searches for cop, loops again, searches for players with wanted level bigger than 0 (1,2,3,etc..), sets marker for cop of the wanted player for certain color
Reply
#6

would it work?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)