Changing colors of players visible just for one? - 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: Changing colors of players visible just for one? (
/showthread.php?tid=649457)
Changing colors of players visible just for one? -
MrakBuster - 09.02.2018
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!
Re: Changing colors of players visible just for one? -
jasperschellekens - 09.02.2018
Not sure But Maybe this?
https://sampwiki.blast.hk/wiki/SetPlayerMarkerForPlayer
Re: Changing colors of players visible just for one? -
MrakBuster - 09.02.2018
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.
Re: Changing colors of players visible just for one? -
jasperschellekens - 09.02.2018
Dont do much onplayerupdate. It can drasticly lagg your server if done wrong. Use a timer
Re: Changing colors of players visible just for one? -
MrakBuster - 09.02.2018
Just be hones, did I just do a complete BS or I made something, that could possibly work?
PHP код:
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(PlayerInfo[i][pJob] == 1)
{
for(new w = 0; w < MAX_PLAYERS; w++)
{
wantedlevel = GetPlayerWantedLevel(w);
if(wantedlevel > 0)
{
SetPlayerMarkerForPlayer( i, w, 0xFF3900FF );
}
}
}
}
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
Re: Changing colors of players visible just for one? -
MrakBuster - 09.02.2018
would it work?