24.02.2012, 16:22
Okay, So I'm building a teleports filterscript for a freeroam server I've been trying to make
and it works, but it doesn't teleport you.
http://pastebin.com/fzwabmmz
thanks ahead of time.
and it works, but it doesn't teleport you.
http://pastebin.com/fzwabmmz
Код:
// This is a comment // uncomment the line below if you want to write a filterscript //#define FILTERSCRIPT #include <a_samp> #define COLOR_GREY 0x808080FF #define Teleid 1337 #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"); } public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/teles", 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", "Select", "Cancel"); return 1; } return 0; } public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { switch(dialogid) { case 1: { if(!response) { SendClientMessage(playerid, 0xFF0000FF, "You cancelled."); return 0; // We processed it } switch(listitem) { case 0: { SetPlayerInterior (playerid, 0); SetPlayerPos(playerid, 2498.5615,-1669.9823,13.3442 ); } 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 ); SendClientMessage(playerid, 0xFF0000FF, "Welcome to LV"); } 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); } } } } return 1; } #endif