How can I make admins available on map when they go on-duty with the color cyan?
#6

Quote:
Originally Posted by Gogorakis
Посмотреть сообщение
Didnt get you... ...
What she did was replace All of your un-neccessary lines, which check if the player is an admin.
You had each line check each level, which is un-needed, since anyone's admin level whom is higher than 1 is considered an admin.
So she replaced:
if(/*check if player is admin level 1*/)

pawn Код:
if(Playerinfo[playerid][pAdmin] == 1)
{
 SetPlayerColor(playerid,COLOR_CYAN);
}
if(Playerinfo[playerid][pAdmin] == 2)
{
 SetPlayerColor(playerid,COLOR_CYAN);
}
....
//ETC
With a shorter Code, which is also more efficient:
pawn Код:
if(Playerinfo[playerid][pAdmin] >= 1) // DIFFERENCE LIES HERE! INSTEAD OF " Playerinfo == 1 --> Playerinfo == 2" etc, she put: playerinfo >=1
{
 SetPlayerColor(playerid,COLOR_CYAN);
}
As for your main question, you will have to set the player's marker as visible, I believe it should work when you add this code in:

pawn Код:
new i;
for(i=0; i< MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if( i != playerid)
{
SetPlayerMarkerForPlayer(playerid, i, YOUR_COLOR);
}
}
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)