How to let police see only?
#2

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

pawn Код:
#include <foreach>
at the top of your script.
Reply


Messages In This Thread
How to let police see only? - by TheDiscussionCafe - 28.04.2012, 02:55
Re: How to let police see only? - by SuperViper - 28.04.2012, 03:29
Re: How to let police see only? - by TheDiscussionCafe - 28.04.2012, 03:35
Re: How to let police see only? - by SuperViper - 28.04.2012, 03:39
Re: How to let police see only? - by Ballu Miaa - 28.04.2012, 03:42
Re: How to let police see only? - by TheDiscussionCafe - 28.04.2012, 04:44
Re: How to let police see only? - by Ballu Miaa - 28.04.2012, 05:01
Re: How to let police see only? - by TheDiscussionCafe - 28.04.2012, 07:10
Re: How to let police see only? - by TheDiscussionCafe - 28.04.2012, 14:14
Re: How to let police see only? - by TheDiscussionCafe - 28.04.2012, 18:04

Forum Jump:


Users browsing this thread: 1 Guest(s)