10.06.2012, 17:08
I had made a Teleport Dialog Code
Now i Want that If Player Click Base Jump 1 He Gets Teleported There.
That Code is
this.. My Problem is I am Unable To Do That. Can Someone do this? Please. +REP
pawn Код:
CMD:t(playerid, params[])
{
ShowPlayerDialog(playerid, 111,DIALOG_STYLE_LIST,"{00FFFF}Teleports","{FF0000}Base{FFFFFF}Jumps\n{F2FF00}Stunts\n{504124}HotSpots\n{0015FF}Cities\n{00FBFF}Crazy Roads\n{BBBBBB}Liberty{4C4A4A}City{2A2A2A}Interior\n{C2A2DA}Derby\n{68FBF8}Drift","Teleport","Close");
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(response)
{
switch(dialogid)
{
case 111:
{
if(!response) return SendClientMessage(playerid, COLOR_RED,"You have Closed The Teleport Dialog");
{
switch(listitem)
{
case 0:ShowPlayerDialog(playerid, 222, DIALOG_STYLE_LIST,"Base Jumps","Base Jump 1\nBase Jump 2\nBase Jump 3\nBase Jump 4\nBase Jump 5","Teleport","Close");
case 1:ShowPlayerDialog(playerid, 333, DIALOG_STYLE_LIST,"Stunts","MiniStunt\nLas Venturas Stunt\nLos Santos Stunts\nCrazy Loop\nParkourMaddness\nMiniRollerCoster\nMount Chiliad Stunts\nMullholand\nPershing Square\nBay Side","Teleport","Close");
case 2:ShowPlayerDialog(playerid, 444, DIALOG_STYLE_LIST,"HotSpots","Saint Maria Beach\nGroveStreet\nSaint Marks\nUnity Stations\nMaddogs Mansion","Teleport","Close");
case 3:ShowPlayerDialog(playerid, 555, DIALOG_STYLE_LIST,"Cities","Los Santos\nLas Venturas\nSan Fierro","Teleport","Close");
case 4:ShowPlayerDialog(playerid, 666, DIALOG_STYLE_LIST,"Crazy Roads","Crazy Loop\nDisco Road\nCrazy Glass Road\nLong Drive","Teleport","Close");
case 5:ShowPlayerDialog(playerid, 777, DIALOG_STYLE_LIST,"Interiors","Saint Marks\nCity Hall\nBank\nHospital\nLVPD\nLSPD\nSFPD","Teleport","Close");
case 6:ShowPlayerDialog(playerid, 888, DIALOG_STYLE_LIST,"Derby","Las Venturas Derby\nLos Santos Derby\nQuarry Derby\nSan Fierro Derby","Teleport","Close");
case 7:ShowPlayerDialog(playerid, 999, DIALOG_STYLE_LIST,"Drift","Las Venturas Drift\nDrift\nSan Fierro Drift\nLos Santos Drift","Teleport","Close");
}
}
}
}
}
return 0;
}
That Code is
pawn Код:
{
if(IsPlayerInDM[playerid] == 0)
{
new str1[128], player2[MAX_PLAYER_NAME];
GetPlayerName(playerid, player2, sizeof(player2));
format(str1,sizeof(str1),"%s has been teleported to Base Jump 1(/bj1)",player2);
SendClientMessageToAll(COLOR_LIGHTCOLOR_BLUE,str1);
SetPlayerPos(playerid, 1666.7014,-1218.3112,233.3750);
SetPlayerInterior(playerid, 0);
SendClientMessage(playerid, COLOR_YELLOW, "Welcome to BaseJump 1");
GivePlayerWeapon(playerid, 46, 1);
}
else return SendClientMessage(playerid, COLOR_RED,"Use /exitdm before you Teleport!");
return 1;
}