SA-MP Forums Archive
Call 911 > send client to all faction members - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Call 911 > send client to all faction members (/showthread.php?tid=358215)



Call 911 > send client to all faction members - backnot - 09.07.2012

When I call 911 its not sending information to the PD.
Instead its giving it to me


Код:
	// 911
    if(Calling[playerid] && Call911[playerid])
    {
        if(Call911[playerid] == 1)
        {
            format(D911[playerid], 12, "%s", text);
            Call911[playerid] = 2;
            SendClientMessage(playerid, COLOR_YELLOW, "[Cellphone]: Where are u ?");
        }
        else if(Call911[playerid] == 2)
        {
            Call911[playerid] = 0;
            Calling[playerid] = 0;
            SendClientMessage(playerid, COLOR_YELLOW, "[Cellphone]: Okay , Keep calm , our unit will come son");
            SendClientMessage(Caller[playerid], COLOR_ORANGE, " They hung up.");
            format(string, sizeof(string), "{2641FE}Dispatch: {FFFFFF}We received your call from phone %d (( /track %d ))", PlayerInfo[playerid][pCellphone], playerid);
            SendClientMessage(playerid, COLOR_WHITE, string);
            format(string, sizeof(string), "{2641FE}Emergency: {FFFFFF}%s", D911[playerid]);
            SendClientMessage(playerid, COLOR_WHITE, string);
            format(string, sizeof(string), "{2641FE}Location: {FFFFFF}%s", text);
            SendClientMessage(playerid, COLOR_WHITE, string);
            format(D911[playerid], 128, "");
            SetPlayerSpecialAction(playerid, SPECIAL_ACTION_STOPUSECELLPHONE);
        }
    }



Re: Call 911 > send client to all faction members - HyDrAtIc - 09.07.2012

cant you make the picture bigger lol


Re: Call 911 > send client to all faction members - backnot - 09.07.2012

Quote:
Originally Posted by James_Nick
Посмотреть сообщение
cant you make the picture bigger lol
Very helpful +rep lol


Re: Call 911 > send client to all faction members - Elysian` - 09.07.2012

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;
}



Re: Call 911 > send client to all faction members - backnot - 10.07.2012

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;
}



Re: Call 911 > send client to all faction members - newbienoob - 10.07.2012

if(PlayerInfo[i][pFac]


Re: Call 911 > send client to all faction members - clarencecuzz - 10.07.2012

if(PlayerInfo[i][pFac])**


Re: Call 911 > send client to all faction members - backnot - 10.07.2012

thanks all