911 Call
#1

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

Reply
#2

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 ...
Reply
#3

I fixed it using SendCopMessage, thanks anyways.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)