03.05.2010, 17:14
Hey SAMP players, I have a bug in my script. When I call 911, everything goes fine, the PD/EMS receives my message, but it does not close the cellphone..


I would like to have it that it will pocket the cellphone, and that you don't see the (cellphone) word anymore, also that you don't see the cellphone.
I am willing to pay the scripter if he/she knows how to fix this.
Pawn code:
Thanks in advance, Michael.


I would like to have it that it will pocket the cellphone, and that you don't see the (cellphone) word anymore, also that you don't see the cellphone.
I am willing to pay the scripter if he/she knows how to fix this.
Pawn code:
pawn Код:
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;
}