Jump to content
  • 0

Problema /call 112


bimax999

Question

Problema intalnita (descriere):Doresc sa fie optiunea de /call 112 la comanda /call deoarece vreau atunci cand un player omoara alt player sa primeasca wanted prima data 2 si tot asa pana la 6.
Ero(area / rile) / warning-(ul / urile): Nu reusesc nici cum..
Liniile de cod / sursa / script-ul(obligatoriu): 

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


Imagini / Video (optional): 
Ati incercat sa rezolvati singur?:Da de mi-a venit acru

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.