Call 911 > send client to all faction members
#5

Quote:
Originally Posted by Windows32
Посмотреть сообщение
Use a function like this(Need to edit it):
pawn Код:
forward SendMessageToCops(color, const string[]);
public SendMessageToCops(color,const string[]) //create the callback, including color and string
{
    for(new i = 0; i < MAX_PLAYERS; i++) //set a for-loop and loop through all the cops
    {
        if(IsPlayerConnected(i) == 1) //the cop gotta be connected
        if(PInfo[playerid][Cop]) // You need to change this to whatever the cop var is
        SendClientMessage(i, COLOR_GREEN, string); //send this message now to every cop online, with color + string!
    }
    return 1;
}
D:\DOCUME~1\Alex19\MYDOCU~1\ZGAMIN~1.3E\GAMEMO~1\Z RP.pwn(3177) : error 017: undefined symbol "playerid"

Код:
forward SendMessageToCops(color, const string[]);
public SendMessageToCops(color,const string[]) //create the callback, including color and string
{
    for(new i = 0; i < MAX_PLAYERS; i++) //set a for-loop and loop through all the cops
    {
        if(IsPlayerConnected(i) == 1) //the cop gotta be connected
  	if(PlayerInfo[playerid][pFac] == 1)// You need to change this to whatever the cop var is
        SendClientMessage(i, COLOR_GREEN, string); //send this message now to every cop online, with color + string!
    }
    return 1;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)