Anyway how to do this wanted color for cops to see
#1

- Fixed.
Reply
#2

PHP код:
if(Team[playerid] == TEAM_COP)
{
     for(new 
GetPlayerPoolSize(); >= 0; --p) {
      if(
GetPlayerWantedLevel(p) >= 1) {
        
SetPlayerMarkerForPlayer(pplayerid0xFF0000FF);
     } else if(
GetPlayerWantedLevel(p) == 0) {
        
SetPlayerMarkerForPlayer(pplayeridCOLOUR_RED); // This is default color! Removed you team color
        
}
    }

Reply
#3

I mean when i type /duty it will show the wanted color. when i type /duty again it won't show the wanted players.

and i got it like this

Код:
     if(Team[playerid] == TEAM_COP)
     {
     for(new p = GetPlayerPoolSize(); p >= 0; --p) {
     if(GetPlayerWantedLevel(p) >= 1)
	 {
        SetPlayerColor(playerid,COLOUR_RED);
        SetPlayerMarkerForPlayer(p, playerid, 0xFF0000FF);
     }
	 else if(GetPlayerWantedLevel(p) == 0)
	 {
        SetPlayerMarkerForPlayer(p, playerid, COLOUR_RED); // This is default color! Removed you team color
        SetPlayerMarkerForPlayer(p, playerid, COLOUR_RED);
        SetPlayerToTeamColour(playerid);
        }
     }
     }
Reply
#4

Quote:
Originally Posted by DerickClark
Посмотреть сообщение
I mean when i type /duty it will show the wanted color. when i type /duty again it won't show the wanted players.
PHP код:
if(Team[playerid] == TEAM_COP)
{
     for(new 
GetPlayerPoolSize(); >= 0; --p) {
      if(
GetPlayerWantedLevel(p) >= && PoliceDuty[playerid]) { // If is Add it work?
        
SetPlayerMarkerForPlayer(pplayerid0xFF0000FF);
     } else if(
GetPlayerWantedLevel(p) == 0) {
        
SetPlayerMarkerForPlayer(pplayeridCOLOUR_RED); // This is default color! Removed you team color
        
}
    }

Reply
#5

It's working but when i type /duty 2 times. i'm off duty but the color not resting to
Код:
SetPlayerToTeamColour
Код:
if(Team[playerid] == TEAM_COP)
     {
     for(new p = GetPlayerPoolSize(); p >= 0; --p) {
      if(GetPlayerWantedLevel(p) >= 1 && PoliceDuty[playerid])
	  { // If is Add it work?
        SetPlayerColor(playerid,COLOUR_RED);
        SetPlayerMarkerForPlayer(p, playerid, 0xFF0000FF);
     }
	 else if(GetPlayerWantedLevel(p) == 0)
	 {
        SetPlayerMarkerForPlayer(p, playerid, COLOUR_RED); 
        SetPlayerToTeamColour(p);
        }
     }
     }
Reply
#6

Quote:
Originally Posted by DerickClark
Посмотреть сообщение
It's working but when i type /duty 2 times. i'm off duty but the color not resting to
Код:
SetPlayerToTeamColour
Код:
if(Team[playerid] == TEAM_COP)
     {
     for(new p = GetPlayerPoolSize(); p >= 0; --p) {
      if(GetPlayerWantedLevel(p) >= 1 && PoliceDuty[playerid])
	  { // If is Add it work?
        SetPlayerColor(playerid,COLOUR_RED);
        SetPlayerMarkerForPlayer(p, playerid, 0xFF0000FF);
     }
	 else if(GetPlayerWantedLevel(p) == 0)
	 {
        SetPlayerMarkerForPlayer(p, playerid, COLOUR_RED); 
        SetPlayerToTeamColour(p);
        }
     }
     }
PHP код:
if(Team[playerid] == TEAM_COP)
     {
     for(new 
GetPlayerPoolSize(); >= 0; --p) {
      if(
GetPlayerWantedLevel(p) >= && PoliceDuty[playerid])
      { 
// If is Add it work?
        
SetPlayerColor(playerid,COLOUR_RED);
        
SetPlayerMarkerForPlayer(pplayerid0xFF0000FF);
     }
     else if(
GetPlayerWantedLevel(p) == || !PoliceDuty[playerid] ) // Teste it
     
{
        
SetPlayerMarkerForPlayer(pplayeridCOLOUR_RED); // This is default color! Removed you team color
        
SetPlayerToTeamColour(p);
        }
     }
     } 
Reply
#7

Thanks working perfect.
Reply
#8

Quote:
Originally Posted by Logofero
Посмотреть сообщение
PHP код:
if(Team[playerid] == TEAM_COP)
     {
     for(new 
GetPlayerPoolSize(); >= 0; --p) {
      if(
GetPlayerWantedLevel(p) >= && PoliceDuty[playerid])
      { 
// If is Add it work?
        
SetPlayerColor(playerid,COLOUR_RED);
        
SetPlayerMarkerForPlayer(pplayerid0xFF0000FF);
     }
     else if(
GetPlayerWantedLevel(p) == || !PoliceDuty[playerid] ) // Teste it
     
{
        
SetPlayerMarkerForPlayer(pplayeridCOLOUR_RED); // This is default color! Removed you team color
        
SetPlayerToTeamColour(p);
        }
     }
     } 
How to fix the code current that how the code look messes
Reply
#9

Quote:
Originally Posted by DerickClark
Посмотреть сообщение
How to fix the code current that how the code look messes
Not quite understand you.
You mean to have cops and criminals were different colors when searching for?

Cops == COLOR_BLUE
Criminals == COLOR_RED ?
Reply
#10

I mean look at the code it look mess up. this code don't look mess up

Код:
if(Team[playerid] == TEAM_COP) 
{ 
     for(new p = GetPlayerPoolSize(); p >= 0; --p) { 
      if(GetPlayerWantedLevel(p) >= 1 && PoliceDuty[playerid]) { // If is Add it work? 
        SetPlayerMarkerForPlayer(p, playerid, 0xFF0000FF); 
     } else if(GetPlayerWantedLevel(p) == 0) { 
        SetPlayerMarkerForPlayer(p, playerid, COLOUR_RED); // This is default color! Removed you team color 
        } 
    } 
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)