ShowPlayerDialog(playerid, 0, DIALOG_STYLE_LIST,\"TEleportok\",\"teleport 1\\nteleport2\\nteleport3\",\"Kiválaszt\",\"Kilép\");if(dialogid == 0){ if(response) { switch(listitem) { case 0: SetPlayerPos(playerid, 1590.5427,-2286.7063,-1.2054); case 1: SetPlayerPos(playerid, 1025.8188,-1926.5471,12.7863); case 2: SetPlayerPos(playerid, 826.7949,-1344.7988,13.5375); } }}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]){if(dialogid == DIALOG NEVE){ if(response){ if(listitem == 0) { SetPlayerPos(playerid, 1320.4924, 1260.0894, 10.8203); SendClientMessage(playerid,-1, \"Elteleportáltál Los Santosba!\"); } if(listitem == 1) { SetPlayerPos(playerid, 1933.5570,-2300.0474,16.2648); SendClientMessage(playerid,-1, \"Elteleportáltál Las Venturasban!\"); } if(listitem == 2) { SetPlayerPos(playerid, -1528.0000,-206.0000,14.1484); SendClientMessage(playerid,-1, \"Elteleportáltál San Fierroba!\"); } }}
#include <a_samp>#include <zcmd>#define TELE 1 CMD:teleportok(playerid, params[]){ ShowPlayerDialog(playerid, TELE, DIALOG_STYLE_LIST, \"Teleportok\", \"Los Santos \\nLas Venturas \\nSan Fierro\", \"Tovább\", \"Kilépés\"); return 1;}public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]){if(dialogid == TELE) { if(response) { if(listitem == 0) { SetPlayerPos(playerid, 1320.4924, 1260.0894, 10.8203); SendClientMessage(playerid,-1, \"Elteleportáltál Los Santosba!\"); } if(listitem == 1) { SetPlayerPos(playerid, 1933.5570,-2300.0474,16.2648); SendClientMessage(playerid,-1, \"Elteleportáltál Las Venturasban!\"); } if(listitem == 2) { SetPlayerPos(playerid, -1528.0000,-206.0000,14.1484); SendClientMessage(playerid,-1, \"Elteleportáltál San Fierroba!\"); }}}else{ if(!response) { SendClientMessage(playerid,-1, \"Már nem nézed a teleportok listáját!\"); }}return 1;}
“Tele1\\nTele2\\nTele3“
stock Teleport( playerid, Float: X, Float: Y, Float: Z, const TeleName[] ){ new szString[ 144 + 1 ]; format( szString, sizeof( szString ), \"Elteleportáltál %s nevû helyre.\", TeleName ); SetPlayerPos( playerid, X, Y, Z ); SendClientMessage( playerid, -1, szString ); return 1;}
Teleport( playerid, 0.0, 0.1, 0.2, \"Los Santos\" );