/call for /call 112 -
bimax999 - 10.07.2015
need to have this command option / call 112 ie if you kill someone wanted to give you if x , y, z type / call 112
Код:
if(strcmp(cmd, "/call", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendUsage(playerid,"/call [phonenumber]");
return 1;
}
if(P_DATA[playerid][pPnumber] == 0)
{
SendClientMessage(playerid, COLOR_GRAD2, "Nu ai un telefon!");
return 1;
}
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s a scos din buzunar un telefon.", sendername);
MeBigears = 1;
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
new phonenumb = strval(tmp);
if(phonenumb == 112)
{
SendClientMessage(playerid, COLOR_WHITE, "HINT: Foloseste T ca sa vorbesti la telefon, scrie /hangup ca sa inchizi.");
SendClientMessage(playerid, COLOR_ALLDEPT, "Urgenta: Ce serviciu doresti? Police sau Paramedic?");
Mobile[playerid] = 911;
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_USECELLPHONE);
SetPlayerAttachedObject(playerid, 4, 330, 6);
return 1;
}
if(phonenumb == P_DATA[playerid][pPnumber])
{
SendClientMessage(playerid, COLOR_GRAD2, "Suna ocupat...");
return 1;
}
if(Mobile[playerid] != 255)
{
SendClientMessage(playerid, COLOR_GRAD2, "Deja suni pe cineva...");
return 1;
}
foreach(new i : Player)
{
if(P_DATA[i][pPnumber] == phonenumb && phonenumb != 0)
{
giveplayerid = i;
if(Mobile[giveplayerid] != 255)
{
SendClientMessage(playerid, COLOR_GRAD2, "Numar ocupat...");
return 1;
}
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
if(PhoneOnline[giveplayerid] > 0)
{
SendClientMessage(playerid, COLOR_GREY, "Esti in reteaua Play-Art, momentan abonatul nu este disponibil!");
return 1;
}
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_USECELLPHONE);
SetPlayerAttachedObject(playerid, 4, 330, 6);
Mobile[playerid] = giveplayerid; //caller connecting
if (Mobile[giveplayerid] == 255)
{
format(string, sizeof(string), "Telefonul tau suna scrie /pickup ca sa raspunzi. Te suna {FF4800}%s", sendername);
SendClientMessage(giveplayerid, COLOR_YELLOW, string);
PlayerPlaySound(giveplayerid,1052,0.0,0.0,0.0);
GetPlayerName(giveplayerid, sendername, sizeof(sendername));
RingTone[giveplayerid] = 10;
format(string, sizeof(string), "* Telefonul lui %s suna.", sendername);
SendClientMessage(playerid, COLOR_WHITE, "HINT: Foloseste T ca sa vorbesti la telefon, scrie /hangup ca sa inchizi");
ProxDetector(30.0, i, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
CellTime[playerid] = 1;
return 1;
}
}
}
}
}
SendClientMessage(playerid, COLOR_GRAD2, "Suna ocupat...");
}
return 1;
}
Re: /call for /call 112 !! HELP MEE -
dominik523 - 10.07.2015
Okay. What is the problem? And one more thing, switch to ZCMD and sscanf.
Re: /call for /call 112 !! HELP MEE -
bimax999 - 10.07.2015
1.How switch to ZCMD and SCANF?
2.My problem is: I when a player kills me to type / call 112 and wanted to give it meaning as if I am the police ..
Re: /call for /call 112 !! HELP MEE -
dominik523 - 10.07.2015
Just search for zcmd/sscanf2 tutorials on the forums, like this one:
https://sampforum.blast.hk/showthread.php?tid=300397
Re: /call for /call 112 !! HELP MEE -
bimax999 - 10.07.2015
And problem 2 ? I when a player kills me to type / call 112 and wanted to give it meaning as if I am the police ..
Re: /call for /call 112 !! HELP MEE -
dominik523 - 10.07.2015
Sorry I don't understand what do you mean.
Re: /call for /call 112 !! HELP MEE -
bimax999 - 10.07.2015
-when kill a cop gives 50k
-when someone kills a cop does not get wanted !
-When A player is killed having wanted not serve jail !
@dominik523