[HELP]Public Phone
#1

please anyone, Can you make up filterscript public telephone.

Код:
if(IsAtPPhone(playerid))
	{
		GameTextForPlayer(playerid, "~w~Payphone~n~~b~/usephone", 5000, 3);
		return 1;
	}
Код:
if(strcmp(cmd, "/usephone", true) == 0)
	{
		if (!IsAtPPhone(playerid))
		{
			SendClientMessage(playerid, COLOR_GRAD2, " You are not near a payphone!");
			return 1;
		}
                ShowPlayerDialog(playerid, DACCT32, DIALOG_STYLE_MSGBOX, "Telephone Booth", "Call", "Select", "Cancel");
    	        return 1;
	}
Код:
public IsAtPPhone(playerid)
{
	if(IsPlayerConnected(playerid))
	{
		if(IsPlayerInRangeOfPoint(playerid,2.0, 2257.6204,-1211.6672,23.9688))
		{
			return 1;
		}
		else if(IsPlayerInRangeOfPoint(playerid,2.0, 2259.1699,-1211.6823,23.9688))
		{
			return 1;
		}
		else if(IsPlayerInRangeOfPoint(playerid,2.0, 2166.4114,-1155.8069,24.8616))
		{
			return 1;
		}
		else if(IsPlayerInRangeOfPoint(playerid,2.0, 2166.3911,-1154.8484,24.8768))
		{
			return 1;
                }
Код:
if(dialogid == DACCT32)
	{
		if(response)
    	{
   			ShowPlayerDialog(playerid, DACCT33, DIALOG_STYLE_INPUT, "Phone Booth","Please type in the number of the person you want to call", "Call", "Cancel");
   		}
	}
Код:
if(dialogid == DACCT33)
	 {
		if (response)
		{
			new giveplayer[MAX_PLAYER_NAME];
			new giveplayerid;
			//new dstring[256];
			new string[256];
			new sendername[MAX_PLAYER_NAME];
			giveplayerid = ReturnUser(inputtext);
			GetPlayerName(playerid, sendername, sizeof(sendername));
			GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
			new sendername2[MAX_PLAYER_NAME];
			GetPlayerName(playerid, sendername, sizeof(sendername));
			GetPlayerName(playerid, sendername2, sizeof(sendername2));
			format(string, sizeof(string), "* %s %s picks up the phone and enters a coin into the phone then dials a number.", sendername2);
			ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
			new phonenumb = strval(inputtext);
and to pick up a model for the phone to add my own. thanks Before
Reply
#2

please help me ..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)