How to let police see only? -
TheDiscussionCafe - 28.04.2012
I have gTeam = Team_Cop and gTeam = Team_Civi
How can I make Team_Civi see everyone's names from chat and from screen to white all the time and for Team_Cop, they can see if player is wanted or not. Even if players from Team_Civi is wanted with many stars, other Team_Civi players cannot see, only Team_Cop players. How to do?
Re: How to let police see only? -
SuperViper - 28.04.2012
Replace your whole OnPlayerText with this:
pawn Код:
public OnPlayerText(playerid, text[])
{
if(GetPlayerWantedLevel(playerid) > 0)
{
new string[128], playersName[MAX_PLAYER_NAME];
GetPlayerName(playerid, playersName, sizeof(playersName));
foreach(new i: Player)
{
if(gTeam[playerid] == Team_Civi)
{
format(string, sizeof(string), "%s{FFFFFF}: %s", playersName, text);
}
else if(gTeam[playerid] == Team_Cop)
{
format(string, sizeof(string), "[WANTED] %s{FFFFFF}: %s", playersName, text);
}
SendClientMessage(i, GetPlayerColor(playerid), string);
}
return 0;
}
else
{
return 1;
}
}
and make sure you have the foreach plugin by ****** and have
at the top of your script.
Re: How to let police see only? -
TheDiscussionCafe - 28.04.2012
What about color above player heads? And how i can make for zcmd?
Re: How to let police see only? -
SuperViper - 28.04.2012
ZCMD has nothing to do with text, so just leave it like that. For setting the colors above the player's head, use SetPlayerColor.
Re: How to let police see only? -
Ballu Miaa - 28.04.2012
The color over Player heads are done by SetPlayerColor native function. Search wiki for it.
Re: How to let police see only? -
TheDiscussionCafe - 28.04.2012
Quote:
Originally Posted by SuperViper
ZCMD has nothing to do with text, so just leave it like that. For setting the colors above the player's head, use SetPlayerColor.
|
Quote:
Originally Posted by Ballu Miaa
The color over Player heads are done by SetPlayerColor native function. Search wiki for it.
|
I dont get how to do for Team_Cop. help please?
Re: How to let police see only? -
Ballu Miaa - 28.04.2012
Use it like this: Just a working example
pawn Код:
public OnPlayerSpawn(playerid)
{
if(gTeam[playerid] == Team_Civi) return SetPlayerColor(playerid, 0x1f3ccdcf);
if(gTeam[playerid] == Team_Cop) return SetPlayerColor(playerid, 0xFFFFFFAA);
return 1;
}
Re: How to let police see only? -
TheDiscussionCafe - 28.04.2012
Quote:
Originally Posted by Ballu Miaa
Use it like this: Just a working example
pawn Код:
public OnPlayerSpawn(playerid) { if(gTeam[playerid] == Team_Civi) return SetPlayerColor(playerid, 0x1f3ccdcf); if(gTeam[playerid] == Team_Cop) return SetPlayerColor(playerid, 0xFFFFFFAA); return 1; }
|
no that doesnt work. well maybe i have to set how much wanted level or something? how can i do that?
Re: How to let police see only? -
TheDiscussionCafe - 28.04.2012
How i do this plese?
Re: How to let police see only? -
TheDiscussionCafe - 28.04.2012
can anyone help!