12.01.2018, 02:31
Hi guys, i have problems with this Dialog teleport, i can compiler them can use it (just show dialog and, clicked Floor 1/2/3/4 but did not teleport) and i want set this dialog just can use at this point (1079.6085,2346.6362,10.8203).
My English not good, sorry.
My English not good, sorry.
Код:
#include <a_samp>
#include <zcmd>
#define DIALOG_TELEPORT 1
#define Teleid 13396
CMD:elevator(playerid,params[])
{
ShowPlayerDialog(playerid, DIALOG_TELEPORT, DIALOG_STYLE_LIST, "Elevator", "Floor 1\nFloor 2\nFloor 3\Floor 4", "Go", "Cancel");
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == DIALOG_TELEPORT)
{
switch(dialogid) {
case Teleid:
{
if (!response) return SendClientMessage(playerid, 0xFF0000FF, "You cancelled.");
if(response) {
switch(listitem) {
case 0:
{
SetPlayerInterior (playerid, 0);
SetPlayerPos(playerid, 1146.1284,2213.0630,16.7188);
}
case 1:
{
SetPlayerInterior (playerid, 0);
SetPlayerPos(playerid, 1121.3375,2214.4021,19.7628);
}
case 2:
{
SetPlayerInterior (playerid, 0);
SetPlayerPos(playerid, 1071.8690,2215.1221,16.7188);
}
case 3:
{
SetPlayerInterior (playerid, 0);
SetPlayerPos(playerid, 1146.5698,2334.1914,10.8203);
}
case 4:
{
SetPlayerInterior (playerid, 0);
SetPlayerPos (playerid, -2321.5945,-1636.9006,483.7031);
}
}
}
}
}
}
return 0;
}

