name color
#4

Hi!

I wrote a code for you which you can use. But: You have to optimize it (e.g. the query => IsPlayerCop) and so on.
PHP код:
//OnPlayerDeath:
public OnPlayerDeath(playerid,killerid,reason)
{
    if(
killerid != INVALID_PLAYER_ID && IsPlayerCop(killerid) && GetPlayerWantedLevel(playerid) > 0)
    {
        
SetPlayerWantedLevel(playerid,0);
        for(new 
i<MAX_PLAYERS;i++)
        {
            if(!
IsPlayerConnected(i) || IsPlayerNPC(i))continue;
            if(
IsPlayerCop(i))
            {
                
SetPlayerMarkerForPlayer(i,playerid,-1);//White color
            
}
        }
    }
    return 
1;
}
//When the player will get the wanteds:
for(new i<MAX_PLAYERS;i++)
{
    if(!
IsPlayerConnected(i) || IsPlayerNPC(i))continue;
    if(
IsPlayerCop(i))
     {
        
SetPlayerMarkerForPlayer(i,playerid,0xFF0019FF);//Red color
    
}

Reply


Messages In This Thread
name color - by StR_MaRy - 22.03.2016, 06:15
Re: name color - by itsCody - 22.03.2016, 06:43
Re: name color - by StR_MaRy - 22.03.2016, 12:43
Re: name color - by Mencent - 22.03.2016, 13:03
Re: name color - by StR_MaRy - 22.03.2016, 19:13
Re: name color - by Mencent - 22.03.2016, 19:30
Re: name color - by StR_MaRy - 22.03.2016, 19:50
Re: name color - by Mencent - 22.03.2016, 20:17
Re: name color - by StR_MaRy - 22.03.2016, 21:38

Forum Jump:


Users browsing this thread: 2 Guest(s)