if(Mobile[playerid] != 9999)
{
new idx;
tmp = strtok(text, idx);
GetPlayerNameEx(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "%s says (cellphone): %s", sendername, text);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
if(Mobile[playerid] == 914)
{
/* if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_ORANGERED, "Operator says: What? Repeat that.");
return 0;
}*/
format(string, sizeof(string), "________911 Call________", GetPlayerNameEx(playerid), text);
SendEMTMessage(COLOR_LIGHTRED, string);
format(string, sizeof(string), "Name: %s Phonenumber:", GetPlayerNameEx(playerid), pPnumber);
SendEMTMessage(COLOR_LIGHTRED, string);
format(string, sizeof(string), "Incident: %s", text);
SendEMTMessage(COLOR_LIGHTRED, string);
format(string, sizeof(string), "Location: %s", text);
SendEMTMessage(COLOR_LIGHTRED, string);
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_STOPUSECELLPHONE);
CellTime[playerid] = 0;
SendClientMessage(playerid, COLOR_GRAD2, "You hung up.");
Mobile[playerid] = 225;
}
if(Mobile[playerid] == 912)
{
/* if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_ORANGERED, "Operator says: What? Repeat that.");
return 0;
}*/
format(string, sizeof(string), "________911 Call________", GetPlayerNameEx(playerid), text);
SendPoliceMessage(COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "Name: %s", GetPlayerNameEx(playerid));
SendPoliceMessage(COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "Incident & Location: %s", text);
SendPoliceMessage(COLOR_LIGHTBLUE, string);
SendfbiMessage(COLOR_LIGHTBLUE, string);
Mobile[playerid] = 255;
}
if(Mobile[playerid] == 911)
{
if (strcmp("Police", text, true, 10) == 0)
{
SendClientMessage(playerid, COLOR_GREEN, "Operator says: Ok, you need the police, give a description of the crime and your LOCATION!");
Mobile[playerid] = 912;
}
else if (strcmp("EMS", text, true, 10) == 0)
{
SendClientMessage(playerid, COLOR_GREEN, "Operator says: Ok, you need an ambulance, give us your LOCATION.");
Mobile[playerid] = 914;
}
else
{
SendClientMessage(playerid, COLOR_GREEN, "Operator says: What? I asked do you need the police or a EMS.");
return 0;
}
}
if(IsPlayerConnected(Mobile[playerid]))
{
if(Mobile[Mobile[playerid]] == playerid)
{
SendClientMessage(Mobile[playerid], COLOR_YELLOW,string);
}
}
return 0;
}
Mobile[playerid] = 9999;
Originally Posted by Freddo [BINMAN
]
pawn Код:
|
if(Mobile[playerid] != 9999)
Originally Posted by Michael23
Quote:
pawn Код:
|
SendClientMessage(playerid, COLOR_GRAD2, "You hung up.");
Mobile[playerid] = 225;
SendClientMessage(playerid, COLOR_GRAD2, "You hung up.");
Mobile[playerid] = 9999;
Originally Posted by Michael23
@ both, Thanks, it's working, but I still see the cellphone in my hands, which is quite annoying.
Also, I would like to add, when you filled in the location, and you're done with that, that it will show a /me that you putted your cellphone in your pocket, Thanks. |
SendClientMessage(playerid, COLOR_GRAD2, "You hung up.");
Mobile[playerid] = 9999;
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_STOPUSECELLPHONE);
SendClientMessage(playerid, COLOR_GRAD2, "You hung up.");
Mobile[playerid] = 9999;
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_STOPUSECELLPHONE);
new Float:X, Float:Y, Float:Z, message[128], name[MAX_PLAYER_NAME];
GetPlayerPos(playerid, X, Y, Z);
GetPlayerName(playerid, name, sizeof(name));
format(message,sizeof(message), "%s puts his/her phone back in his/her pocket.", name);
for(new i=0; i<MAX_PLAYERS; i++) {
if(IsPlayerInRangeOfPoint(i, 10, X, Y, Z)) {
SendClientMessage(i, COLOR_HERE, message);
}
}