SA-MP Forums Archive
911 Call - 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: 911 Call (/showthread.php?tid=392582)



911 Call - Fiore - 14.11.2012

Hello, how can i make the part highlighted show only for cops?

Quote:

// 911
if(Calling[playerid] && Call911[playerid])
{
if(Call911[playerid] == 1)
{
format(D911[playerid], 12, "%s", text);
Call911[playerid] = 2;
SendClientMessage(playerid, COLOR_YELLOW, "[Cellphone]: What is your current location?");
}
else if(Call911[playerid] == 2)
{
Call911[playerid] = 0;
Calling[playerid] = 0;
SendClientMessage(playerid, COLOR_YELLOW, "[Cellphone]: Alright, we have received your emergency call and a unit will be there shortly.");
SendClientMessage(Caller[playerid], COLOR_ORANGE, " They hungup the line.");
format(string, sizeof(string), "{2641FE}Dispatch: {FFFFFF}We have received an emergency call from the phone number %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: 911 Call - mastermax7777 - 14.11.2012

pawn Код:
for (new i =0; i<MAX_PLAYERS;i++)
{
if(team[i] == COPS ) {
SendClientMessage(i, -1, str);
}
}
Ofc, it's just an example. change Team[] and COPS to ur cop variable and team ...


Re: 911 Call - Fiore - 15.11.2012

I fixed it using SendCopMessage, thanks anyways.