28.09.2015, 19:02
I have this teleport script. With dialog etc . But when i select a teleport option it does not tele the player there? And just quits the dialog?
Help? Rep+
Help? Rep+
Код:
/* filterscript written by Connorlolz of the sa-mp forums. this may be a noob script, but don't steal it */ #include <a_samp> #define COLOR_GREY 0x808080FF #define Teleid 13396 #define COLOR_WHITE 0xFFFFFFFF #if defined FILTERSCRIPT public OnFilterScriptInit() { print("\n--------------------------------------"); print(" Teleport FS By Connorlolz"); print("--------------------------------------\n"); return 1; } public OnFilterScriptExit() { return 1; } #else main() { print("\n----------------------------------"); print(" Blank Gamemode by your name here"); print("----------------------------------\n"); } #endif public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/tele", cmdtext, true, 10) == 0) { ShowPlayerDialog(playerid, Teleid, DIALOG_STYLE_LIST, "Teleport Selection", "Los Santos\nSan Fierro\nLas Venturas\nAircraft Carrier\nMount Chilliad\nPig Pen\nShamal\nJefferson Motel\nLSPD\nSFPD\nLVPD\nBinco\nArea 69\nAndromada\nLos Santos Airport\nO.G Loc's\nLiberty City(outside)(buggy)\nBank\n Liberty City(inside)\nLS Atrium\nSherman Damn\n8-Track\nBloodbowl\nDirt Track\nKickstart\nVice Stadium\nStar Tower\nVehicle Basketball", "Select", "Cancel"); return 1; } return 0; } public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { switch(dialogid) { case Teleid: { if (!response) return SendClientMessage(playerid, 0xFF0000FF, "You cancelled."); if(response) { switch(listitem) { case 0: { SetPlayerInterior (playerid, 0); SetPlayerPos(playerid, -302.5238,1519.8558,78.3594 ); } case 1: { SetPlayerInterior (playerid, 0); SetPlayerPos (playerid, -2900.9683,464.0657,4.9141 ); } case 2: { SetPlayerInterior (playerid, 0); SetPlayerPos (playerid, 2000.7534,1529.9393,14.6223 ); } case 3: { SetPlayerInterior (playerid, 0); SetPlayerPos (playerid, -1310.8959,499.1293,18.2344 ); } case 4: { SetPlayerInterior (playerid, 0); SetPlayerPos (playerid, -2321.5945,-1636.9006,483.7031); } case 5: { SetPlayerInterior(playerid, 2); SetPlayerPos (playerid, 1204.809936,-11.586799,1000.921875); } case 6: { SetPlayerInterior(playerid, 1); SetPlayerPos (playerid, 1.808619,32.384357,1199.593750); } case 7: { SetPlayerInterior(playerid, 15); SetPlayerPos (playerid, 2215.454833,-1147.475585,1025.796875); } case 8: { SetPlayerInterior(playerid, 6); SetPlayerPos (playerid, 246.783996,63.900199,1003.640625); } case 9: { SetPlayerInterior(playerid, 10); SetPlayerPos (playerid, 246.375991,109.245994,1003.218750); } case 10: { SetPlayerInterior(playerid, 3); SetPlayerPos (playerid, 288.745971,169.350997,1007.171875); } case 11: { SetPlayerInterior(playerid, 15); SetPlayerPos (playerid, 207.737991,-109.019996,1005.132812); } case 12: { SetPlayerInterior(playerid, 0); SetPlayerPos (playerid, 214.3151,1871.5281,13.1406); } case 13: { SetPlayerInterior(playerid, 9); SetPlayerPos (playerid, 315.745086,984.969299,1958.919067); SendClientMessage(playerid, COLOR_WHITE, "I wouldn't suggest skydiving, as your in an interior"); } case 14: { SetPlayerInterior(playerid, 0); SetPlayerPos (playerid, 2096.8315,-2454.4473,13.5469); } case 15: { SetPlayerInterior(playerid, 3); SetPlayerPos (playerid, 513.882507,-11.269994,1001.565307); } case 16: { SetPlayerInterior(playerid, 1); SetPlayerPos (playerid, -729.276000,503.086944,1371.971801); } case 17: { SetPlayerInterior(playerid, 0); SetPlayerPos (playerid, 2315.952880,-1.618174,26.742187); } case 18: { SetPlayerInterior(playerid, 1); SetPlayerPos (playerid, -794.806396,497.738037,1376.195312); } case 19: { SetPlayerInterior(playerid, 18); SetPlayerPos (playerid, 1710.433715,-1669.379272,20.225049); } case 20: { SetPlayerInterior(playerid, 17); SetPlayerPos (playerid, -959.564392,1848.576782,9.000000); } case 21: { SetPlayerInterior(playerid, 7); SetPlayerPos (playerid, -1398.065307,-217.028900,1051.115844); } case 22: { SetPlayerInterior(playerid, 15); SetPlayerPos (playerid, -1398.103515,937.631164,1036.479125); } case 23: { SetPlayerInterior(playerid, 4); SetPlayerPos (playerid, -1444.645507,-664.526000,1053.572998); } case 24: { SetPlayerInterior(playerid, 14); SetPlayerPos (playerid, -1465.268676,1557.868286,1052.531250); } case 25: { SetPlayerInterior(playerid, 1); SetPlayerPos (playerid, -1401.829956,107.051300,1032.273437); } case 26: { SetPlayerPos (playerid,1544.9849,-1353.7681,329.4735); SetPlayerInterior(playerid, 0); } case 27: { SetPlayerPos(playerid, 3362.55, -1522.44, 323.67); SetPlayerInterior(playerid, 0); } } } } } return 0; }