Need Teleport Dialog Box
#5

Код:
#define TELE 5678 //Top Of your Script

//Your Command
	if(strcmp(cmdtext,"/teleports",true)==0)
	{
	ShowPlayerDialog(playerid,TELE,DIALOG_STYLE_LIST,"Teleports"," D-Day Team \n The Twistry Road","Teleport", "Cancel");
	return 1;
	}




//your Dialog response
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{


	switch(dialogid == TELE) 
    {
        case 1:
        {
            if(!response) return SendClientMessage(playerid, 0xFF0000FF, "You cancel the teleports dialog.");

            switch(listitem) 
            {
            
                case 0: 
                {
                
                       new name[MAX_PLAYER_NAME];
                new msg[256];
		SetPlayerPos(playerid,2827.3567,-2143.6956,11.0872);
		GameTextForPlayer(playerid, "~w~Welcome To D-Day1 Deathmatch~G~", 5000, 5);
        GivePlayerWeapon(playerid,29,700);//weapon mp5
		GivePlayerWeapon(playerid,31,400);//m4
		GivePlayerWeapon(playerid,16,20);//nades
		GivePlayerWeapon(playerid,23,50000);//pistol
        GetPlayerName(playerid,name,MAX_PLAYER_NAME);
        format(msg, sizeof(msg), "TELE: %s has joined D-Day Team 1 (/dday1)",name,playerid);
        SendClientMessageToAll(COLOR_YELLOW, msg);
                }
                case 1:
                {
                		new vehicleid = GetPlayerVehicleID(playerid);
		new State = GetPlayerState(playerid);
		if(IsPlayerInAnyVehicle(playerid) && State == PLAYER_STATE_DRIVER)
		{
            GetPlayerName(playerid,name,MAX_PLAYER_NAME);
            format(msg, sizeof(msg), "TELE: %s has gone to The Twisty Road (/twist)",name,playerid);
            SendClientMessageToAll(COLOR_YELLOW, msg);
			GameTextForPlayer(playerid, "~w~Type /v to spawn cars ~G~", 5000, 5);
			return SetVehiclePos(vehicleid,947.219055, 142.820281, 302.127349);
		}
        GetPlayerName(playerid,name,MAX_PLAYER_NAME);
        format(msg, sizeof(msg), "TELE: %s has gone to The Twisty Road (/twist)",name,playerid);
        SendClientMessageToAll(COLOR_YELLOW, msg);
		SetPlayerPos(playerid,947.219055, 142.820281, 302.127349);
		GameTextForPlayer(playerid, "~w~Type /v to spawn cars ~G~", 5000, 5);
                }
                case 2:
                {
                 //Add Here your 3rd List Choice and ++
                }
                

            }

        }
        

    }
    
	return 1;
}
Reply


Messages In This Thread
Need Teleport Dialog Box - by Salsa - 29.09.2011, 11:16
Re: Need Teleport Dialog Box - by serman - 29.09.2011, 11:47
Re: Need Teleport Dialog Box - by Salsa - 29.09.2011, 13:38
Re: Need Teleport Dialog Box - by Jafet_Macario - 29.09.2011, 13:52
Re: Need Teleport Dialog Box - by serman - 29.09.2011, 13:53
Re: Need Teleport Dialog Box - by Salsa - 29.09.2011, 14:21

Forum Jump:


Users browsing this thread: 1 Guest(s)