Advertisement
xTurbox

Interior Teleport System

Sep 9th, 2015
227
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 14.31 KB | None | 0 0
  1. //==============================================================================
  2. // Includes
  3. //==============================================================================
  4.  
  5. #include <a_samp>
  6. #include <izcmd>
  7. #include <sscanf2>
  8. //==============================================================================
  9. // Defines
  10. //==============================================================================
  11.  
  12. #define FILTERSCRIPT
  13. //_________________________________Options______________________________________
  14. #define ADMIN       IsPlayerAdmin(playerid)//change line to match your admin system at the moment it is rcon admin
  15. #define ONLY_ADMIN  true //Change true to false if you want every one to use the cmds
  16. #define RESET_WEAPS true//Change this to false if you don't want players to reset their weapons while using the teleport cmds
  17.  
  18. //________________________________COLORS________________________________________
  19. #define RED     0xFF0000FF
  20. #define GREEN   0x00FF00FF
  21. #define BLUE    0x0000FFFF
  22.  
  23.  
  24. //_____________________________Short forms______________________________________
  25. #define SCM         SendClientMessage
  26. #define VEH         IsPlayerInAnyVehicle
  27. #define SPP         SetPlayerPos
  28. #define SPI         SetPlayerInterior
  29. #define GT          GameTextForPlayer
  30. #define RPW         ResetPlayerWeapons
  31.  
  32. #if defined FILTERSCRIPT
  33.  
  34. //==============================================================================
  35. // Call Backs
  36. //==============================================================================
  37.  
  38. public OnFilterScriptInit()
  39. {
  40.     print("\n===================================================================");
  41.     print("____________Interior Teleport system by TURBO loading....____________");
  42.     print("________Interior Teleport system by TURBO Successfully Loaded________");
  43.     print("=====================================================================\n");
  44.     return 1;
  45. }
  46.  
  47. public OnFilterScriptExit()
  48. {
  49.     print("\n===================================================================");
  50.     print("____________Interior Teleport system by TURBO Unloading....____________");
  51.     print("________Interior Teleport system by TURBO Successfully Unloaded________");
  52.     print("=====================================================================\n");
  53.     return 1;
  54. }
  55. #endif
  56. CMD:intcredits(playerid,params[])
  57. {
  58.     SCM(playerid,BLUE,"Interior Teleport System FS(filterscript)");
  59.     SCM(playerid,BLUE,"Was made by Turbo");
  60.     SCM(playerid,BLUE,"Special thanks to: http://weedarr.wikidot.com for interior ids");
  61.     SCM(playerid,BLUE,"Special thanks to: Zeex for zcmd(Yashas for i-zcmd)");
  62.     return 1;
  63.     }
  64. CMD:inttele(playerid,params[])
  65. {
  66.     ShowPlayerDialog(playerid,7323,DIALOG_STYLE_MSGBOX,"Interior Teleports","/shamal\n/ammubooth\n/andro\n/ammurange\n/area51\n/libertycityout\t/lco\n/libertycityin\t/lci\n/warehouse1\t/wh1\n/warehouse2\t/wh2\n/bank\n/dirttrack\n/pleasuredomes\n/battlefield\n/sfhq\n/lvhq\n/lshq\n/8track\n/bloodbowl\n/kickstart\n/hiddenroom","close","");
  67.     return 1;
  68.     }
  69. CMD:intcmds(playerid,params[])
  70. {
  71.     SCM(playerid,BLUE,"/inttele:    Displays the list of teleports");
  72.     SCM(playerid,BLUE,"/intcmds:    Displays the interior teleport related commands");
  73.     SCM(playerid,BLUE,"/killme:     Kills yourself(once you teleport you cannot come back, use this cmd instead");
  74.     SCM(playerid,BLUE,"/intcredits: Displays the credits of interior teleport");
  75.     SCM(playerid,BLUE,"/adminkill:  kills the player specified");
  76.     return 1;
  77.     }
  78. CMD:shamal(playerid,params[])
  79. {
  80.     #if ONLY_ADMIN == true
  81.     if(!ADMIN) return 0;
  82.     #endif
  83.         #if RESET_WEAPS == true
  84.         {
  85.         RPW(playerid);
  86.         #endif
  87.         }
  88.     if(VEH(playerid))
  89.  {
  90.     SCM(playerid,RED,"[ERROR]:You cannot use this command while in a vehicle");
  91.     }
  92.     else
  93.     {
  94.     SPP(playerid,1.808619,32.384357,1199.59375);
  95.     SPI(playerid,1);
  96.     SCM(playerid,GREEN,"You have teleported to shamal interior successfully");
  97.     GT(playerid,"~b~Welcome to~r~ shamal",5000,3);
  98.     }
  99.     return 1;
  100. }
  101. CMD:andro(playerid,params[])
  102. {
  103.     #if ONLY_ADMIN == true
  104.     if(!ADMIN) return 0;
  105.     #endif
  106.     #if RESET_WEAPS == true
  107.         {
  108.         RPW(playerid);
  109.         #endif
  110.         }
  111.     if(VEH(playerid))
  112.     {
  113.     SCM(playerid,RED,"[ERROR]:You cannot use this command while in a vehicle");
  114.     }
  115.     else
  116.     {
  117.     SPP(playerid,315.745086,984.969299,1958.919067);
  118.     SPI(playerid,9);
  119.     SCM(playerid,GREEN,"You have teleported to andromada interior successfully");
  120.     GT(playerid,"~b~Welcome to~r~ andromada",5000,3);
  121.     }
  122.     return 1;
  123. }
  124. CMD:ammubooth(playerid,params[])
  125. {
  126.     #if ONLY_ADMIN == true
  127.     if(!ADMIN) return 0;
  128.     #endif
  129.     #if RESET_WEAPS == true
  130.         {
  131.         RPW(playerid);
  132.         #endif
  133.         }
  134.     if(VEH(playerid))
  135.     {
  136.     SCM(playerid,RED,"[ERROR]:You cannot use this command while in a vehicle");
  137.     }
  138.     else
  139.     {
  140.     SPP(playerid,302.292877,-143.139099,1004.062500);
  141.     SPI(playerid,7);
  142.     SCM(playerid,GREEN,"You have teleported to ammunation booths successfully");
  143.     GT(playerid,"~b~Welcome to~r~ ammunation booths",5000,3);
  144.     }
  145.     return 1;
  146. }
  147. CMD:ammurange(playerid,params[])
  148. {
  149.     #if ONLY_ADMIN == true
  150.     if(!ADMIN) return 0;
  151.     #endif
  152.     #if RESET_WEAPS == true
  153.         {
  154.         RPW(playerid);
  155.         #endif
  156.         }
  157.     if(VEH(playerid))
  158.     {
  159.     SCM(playerid,RED,"[ERROR]:You cannot use this command while in a vehicle");
  160.     }
  161.     else
  162.     {
  163.     SPP(playerid,298.507934,-141.647048,1004.054748);
  164.     SPI(playerid,7);
  165.     SCM(playerid,GREEN,"You have teleported to ammunation range successfully");
  166.     GT(playerid,"~b~Welcome to~r~ ammunation range",5000,3);
  167.     }
  168.     return 1;
  169. }
  170. CMD:area51(playerid,params[])
  171. {
  172.     #if ONLY_ADMIN == true
  173.     if(!ADMIN) return 0;
  174.     #endif
  175.     #if RESET_WEAPS == true
  176.         {
  177.         RPW(playerid);
  178.         #endif
  179.         }
  180.     if(VEH(playerid))
  181.     {
  182.     SCM(playerid,RED,"[ERROR]:You cannot use this command while in a vehicle");
  183.     }
  184.     else
  185.     {
  186.     SPP(playerid,223.431976,1872.400268,13.73437);
  187.     SPI(playerid,0);
  188.     SCM(playerid,GREEN,"You have teleported to Area 51 successfully");
  189.     GT(playerid,"~b~Welcome to~r~ area 51",5000,3);
  190.     }
  191.     return 1;
  192. }
  193. CMD:libertycityout(playerid,params[])
  194. {
  195.     #if ONLY_ADMIN == true
  196.     if(!ADMIN) return 0;
  197.     #endif
  198.     #if RESET_WEAPS == true
  199.         {
  200.         RPW(playerid);
  201.         #endif
  202.         }
  203.     if(VEH(playerid))
  204.     {
  205.     SCM(playerid,RED,"[ERROR]:You cannot use this command while in a vehicle");
  206.     }
  207.     else
  208.     {
  209.     SPP(playerid,-729.276000,503.086944,1371.971801);
  210.     SPI(playerid,1);
  211.     SCM(playerid,GREEN,"You have teleported to Liberty City Outside successfully");
  212.     GT(playerid,"~b~Welcome to~r~ Liberty City ~n~ ~g~Outside",5000,3);
  213.     }
  214.     return 1;
  215. }
  216. CMD:libertycityin(playerid,params[])
  217. {
  218.     #if ONLY_ADMIN == true
  219.     if(!ADMIN) return 0;
  220.     #endif
  221.     #if RESET_WEAPS == true
  222.         {
  223.         RPW(playerid);
  224.         #endif
  225.         }
  226.     if(VEH(playerid))
  227.     {
  228.     SCM(playerid,RED,"[ERROR]:You cannot use this command while in a vehicle");
  229.     }
  230.     else
  231.     {
  232.     SPP(playerid,-794.806396,497.738037,1376.195312);
  233.     SPI(playerid,1);
  234.     SCM(playerid,GREEN,"You have teleported to Liberty City Inside successfully");
  235.     GT(playerid,"~b~Welcome to~r~ Liberty City ~n~ ~g~Inside",5000,3);
  236.     }
  237.     return 1;
  238. }
  239. CMD:lco(playerid,params[])
  240. {
  241.     return cmd_libertycityout(playerid,params);
  242.     }
  243. CMD:lci(playerid,params[])
  244. {
  245.     return cmd_libertycityin(playerid,params);
  246.     }
  247. CMD:warehouse1(playerid,params[])
  248. {
  249.     #if ONLY_ADMIN == true
  250.     if(!ADMIN) return 0;
  251.     #endif
  252.     #if RESET_WEAPS == true
  253.         {
  254.         RPW(playerid);
  255.         #endif
  256.         }
  257.     if(VEH(playerid))
  258.     {
  259.     SCM(playerid,RED,"[ERROR]:You cannot use this command while in a vehicle");
  260.     }
  261.     else
  262.     {
  263.     SPP(playerid,1412.639892,-1.787510,1000.924377);
  264.     SPI(playerid,1);
  265.     SCM(playerid,GREEN,"You have teleported to WareHouse 1 successfully");
  266.     GT(playerid,"~b~Welcome to~r~ WareHouse 1",5000,3);
  267.     }
  268.     return 1;
  269. }
  270. CMD:warehouse2(playerid,params[])
  271. {
  272.     #if ONLY_ADMIN == true
  273.     if(!ADMIN) return 0;
  274.     #endif
  275.     #if RESET_WEAPS == true
  276.         {
  277.         RPW(playerid);
  278.         #endif
  279.         }
  280.     if(VEH(playerid))
  281.     {
  282.     SCM(playerid,RED,"[ERROR]:You cannot use this command while in a vehicle");
  283.     }
  284.     else
  285.     {
  286.     SPP(playerid,1302.519897,-1.787510,1001.028259);
  287.     SPI(playerid,18);
  288.     SCM(playerid,GREEN,"You have teleported to WareHouse 2 successfully");
  289.     GT(playerid,"~b~Welcome to~r~ WareHouse 2",5000,3);
  290.     }
  291.     return 1;
  292. }
  293. CMD:wh1(playerid,params[])
  294. {
  295.     return cmd_warehouse1(playerid,params);
  296.     }
  297. CMD:wh2(playerid,params[])
  298. {
  299.     return cmd_warehouse2(playerid,params);
  300.     }
  301. CMD:bank(playerid,params[])
  302. {
  303.     #if ONLY_ADMIN == true
  304.     if(!ADMIN) return 0;
  305.     #endif
  306.     #if RESET_WEAPS == true
  307.         {
  308.         RPW(playerid);
  309.         #endif
  310.         }
  311.     if(VEH(playerid))
  312.     {
  313.     SCM(playerid,RED,"[ERROR]:You cannot use this command while in a vehicle");
  314.     }
  315.     else
  316.     {
  317.     SPP(playerid,2315.952880,-1.618174,26.742187);
  318.     SPI(playerid,0);
  319.     SCM(playerid,GREEN,"You have teleported to Bank interior successfully");
  320.     GT(playerid,"~b~Welcome to~r~ Bank",5000,3);
  321.     }
  322.     return 1;
  323. }
  324. CMD:dirttrack(playerid,params[])
  325. {
  326.     #if ONLY_ADMIN == true
  327.     if(!ADMIN) return 0;
  328.     #endif
  329.     #if RESET_WEAPS == true
  330.         {
  331.         RPW(playerid);
  332.         #endif
  333.         }
  334.     if(VEH(playerid))
  335.     {
  336.     SCM(playerid,RED,"[ERROR]:You cannot use this command while in a vehicle");
  337.     }
  338.     else
  339.     {
  340.     SPP(playerid,-1444.645507,-664.526000,1053.572998);
  341.     SPI(playerid,4);
  342.     SCM(playerid,GREEN,"You have teleported to Dirt Track successfully");
  343.     GT(playerid,"~b~Welcome to~r~ Dirt Track",5000,3);
  344.     }
  345.     return 1;
  346. }
  347. CMD:pleasuredomes(playerid,params[])
  348. {
  349.     #if ONLY_ADMIN == true
  350.     if(!ADMIN) return 0;
  351.     #endif
  352.     #if RESET_WEAPS == true
  353.         {
  354.         RPW(playerid);
  355.         #endif
  356.         }
  357.     if(VEH(playerid))
  358.     {
  359.     SCM(playerid,RED,"[ERROR]:You cannot use this command while in a vehicle");
  360.     }
  361.     else
  362.     {
  363.     SPP(playerid,-2640.762939,1406.682006,906.460937);
  364.     SPI(playerid,3);
  365.     SCM(playerid,GREEN,"You have teleported to Pleasure Domes successfully");
  366.     GT(playerid,"~b~Welcome to~r~ Pleasure Domes",5000,3);
  367.     }
  368.     return 1;
  369. }
  370. CMD:battlefield(playerid,params[])
  371. {
  372.     #if ONLY_ADMIN == true
  373.     if(!ADMIN) return 0;
  374.     #endif
  375.     #if RESET_WEAPS == true
  376.         {
  377.         RPW(playerid);
  378.         #endif
  379.         }
  380.     if(VEH(playerid))
  381.     {
  382.     SCM(playerid,RED,"[ERROR]:You cannot use this command while in a vehicle");
  383.     }
  384.     else
  385.     {
  386.     SPP(playerid,-975.975708,1060.983032,1345.671875);
  387.     SPI(playerid,10);
  388.     SCM(playerid,GREEN,"You have teleported to RC battle field successfully");
  389.     GT(playerid,"~b~Welcome to~r~ Battle field",5000,3);
  390.     }
  391.     return 1;
  392. }
  393. CMD:sfhq(playerid,params[])
  394. {
  395.     #if ONLY_ADMIN == true
  396.     if(!ADMIN) return 0;
  397.     #endif
  398.     #if RESET_WEAPS == true
  399.         {
  400.         RPW(playerid);
  401.         #endif
  402.         }
  403.     if(VEH(playerid))
  404.     {
  405.     SCM(playerid,RED,"[ERROR]:You cannot use this command while in a vehicle");
  406.     }
  407.     else
  408.     {
  409.     SPP(playerid,246.375991,109.245994,1003.218750);
  410.     SPI(playerid,10);
  411.     SCM(playerid,GREEN,"You have teleported to Sanfierro Police HQ successfully");
  412.     GT(playerid,"~b~Welcome to~r~ SF Police HQ",5000,3);
  413.     }
  414.     return 1;
  415. }
  416. CMD:lshq(playerid,params[])
  417. {
  418.     #if ONLY_ADMIN == true
  419.     if(!ADMIN) return 0;
  420.     #endif
  421.     #if RESET_WEAPS == true
  422.         {
  423.         RPW(playerid);
  424.         #endif
  425.         }
  426.     if(VEH(playerid))
  427.     {
  428.     SCM(playerid,RED,"[ERROR]:You cannot use this command while in a vehicle");
  429.     }
  430.     else
  431.     {
  432.     SPP(playerid,246.783996,63.900199,1003.640625);
  433.     SPI(playerid,6);
  434.     SCM(playerid,GREEN,"You have teleported to Los Santos Police HQ successfully");
  435.     GT(playerid,"~b~Welcome to~r~ LS Police HQ",5000,3);
  436.     }
  437.     return 1;
  438. }
  439. CMD:lvhq(playerid,params[])
  440. {
  441.     #if ONLY_ADMIN == true
  442.     if(!ADMIN) return 0;
  443.     #endif
  444.     #if RESET_WEAPS == true
  445.         {
  446.         RPW(playerid);
  447.         #endif
  448.         }
  449.     if(VEH(playerid))
  450.     {
  451.     SCM(playerid,RED,"[ERROR]:You cannot use this command while in a vehicle");
  452.     }
  453.     else
  454.     {
  455.     SPP(playerid,288.745971,169.350997,1007.171875);
  456.     SPI(playerid,3);
  457.     SCM(playerid,GREEN,"You have teleported to Las Venturas Police HQ successfully");
  458.     GT(playerid,"~b~Welcome to~r~ LV Police HQ",5000,3);
  459.     }
  460.     return 1;
  461. }
  462. CMD:8track(playerid,params[])
  463. {
  464.     #if ONLY_ADMIN == true
  465.     if(!ADMIN) return 0;
  466.     #endif
  467.     #if RESET_WEAPS == true
  468.         {
  469.         RPW(playerid);
  470.         #endif
  471.         }
  472.     if(VEH(playerid))
  473.     {
  474.     SCM(playerid,RED,"[ERROR]:You cannot use this command while in a vehicle");
  475.     }
  476.     else
  477.     {
  478.     SPP(playerid,-1398.065307,-217.028900,1051.115844);
  479.     SPI(playerid,7);
  480.     SCM(playerid,GREEN,"You have teleported to 8-Track successfully");
  481.     GT(playerid,"~b~Welcome to~r~ 8-Track",5000,3);
  482.     }
  483.     return 1;
  484. }
  485. CMD:bloodbowl(playerid,params[])
  486. {
  487.     #if ONLY_ADMIN == true
  488.     if(!ADMIN) return 0;
  489.     #endif
  490.     #if RESET_WEAPS == true
  491.         {
  492.         RPW(playerid);
  493.         #endif
  494.         }
  495.     if(VEH(playerid))
  496.     {
  497.     SCM(playerid,RED,"[ERROR]:You cannot use this command while in a vehicle");
  498.     }
  499.     else
  500.     {
  501.     SPP(playerid,-1398.103515,937.631164,1036.479125);
  502.     SPI(playerid,15);
  503.     SCM(playerid,GREEN,"You have teleported to BloodBowl successfully");
  504.     GT(playerid,"~b~Welcome to~r~ BloodBowl",5000,3);
  505.     }
  506.     return 1;
  507. }
  508. CMD:kickstart(playerid,params[])
  509. {
  510.     #if ONLY_ADMIN == true
  511.     if(!ADMIN) return 0;
  512.     #endif
  513.     #if RESET_WEAPS == true
  514.         {
  515.         RPW(playerid);
  516.         #endif
  517.         }
  518.     if(VEH(playerid))
  519.     {
  520.     SCM(playerid,RED,"[ERROR]:You cannot use this command while in a vehicle");
  521.     }
  522.     else
  523.     {
  524.     SPP(playerid,-1465.268676,1557.868286,1052.531250);
  525.     SPI(playerid,14);
  526.     SCM(playerid,GREEN,"You have teleported to KickStart successfully");
  527.     GT(playerid,"~b~Welcome to~r~ KickStart",5000,3);
  528.     }
  529.     return 1;
  530. }
  531. CMD:hiddenroom(playerid,params[])
  532. {
  533.     #if ONLY_ADMIN == true
  534.     if(!ADMIN) return 0;
  535.     #endif
  536.     #if RESET_WEAPS == true
  537.         {
  538.         RPW(playerid);
  539.         #endif
  540.         }
  541.     if(VEH(playerid))
  542.     {
  543.     SCM(playerid,RED,"[ERROR]:You cannot use this command while in a vehicle");
  544.     }
  545.     else
  546.     {
  547.     SPP(playerid,2131.507812,1600.818481,1008.359375);
  548.     SPI(playerid,1);
  549.     SCM(playerid,GREEN,"You have teleported to hidden room successfully");
  550.     GT(playerid,"~b~Welcome to~r~ Hidden Room",5000,3);
  551.     }
  552.     return 1;
  553. }
  554. CMD:killme(playerid,params[])
  555. {
  556.     SetPlayerHealth(playerid,0);
  557.     SendClientMessage(playerid,RED,"You have killed your self");
  558.     GameTextForPlayer(playerid,"~r~You killed your self",10000,2);
  559.     return 1;
  560.     }
  561. CMD:adminkill(playerid,params[])
  562. {
  563.     if(!ADMIN) return 0;
  564.     {
  565.     new id,string[128];
  566.     if(sscanf(params, "u", id)) return SCM(playerid,RED, "[ERROR]:/adminkill [ID]");
  567.     if(!IsPlayerConnected(id)) return SCM(playerid,RED, "[ERROR]: Wrong ID!");
  568.     SetPlayerHealth(id,0);
  569.     GameTextForPlayer(id,"Admin killed you",10000,2);
  570.     SCM(id,GREEN,"Admin has killed you");
  571.     format(string,sizeof(string),"You killed player %s!",GetName(playerid));
  572.     SCM(playerid,BLUE,string);
  573.     format(string,sizeof(string),"[ADMIN]Has killed %s!",GetName(id));
  574.     SendClientMessageToAll(GREEN,string);
  575.     }
  576.     return 1;
  577. }
  578. stock GetName(playerid)
  579. {
  580.     new name[MAX_PLAYER_NAME];
  581.     GetPlayerName(playerid, name, sizeof(name));
  582.     return name;
  583. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement