Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*==============================================================================
- CopyRight
- ================================================================================
- You are not allowed to re-release this without my permission
- You can ask for my permission via pm at http://forum.sa-mp.com/member.php?u=265327
- */
- /*==============================================================================
- Change Log
- ================================================================================
- _______________~~version v1.0~~__________________
- -TELEPORT CMDS
- /sfairport
- /wangcars
- /ottocars
- /transfender
- /carrier
- /gym
- /teleports
- _______________~~Version v1.5~~___________________
- /sfbeach
- /paynspray
- /sp1
- /sp2
- /hospital
- /archangels
- /policedept
- /policegarage
- /ammunation
- /supasave
- ___________________~~VERSION v2.0~~___________________
- /thelp
- /tcredits
- /sfa (short for
- /sfb
- /pns
- /pd
- /ds
- /pg
- /ss
- /arch
- /ammu
- /oc
- /wc
- /tf
- ================================================================================
- Includes
- ================================================================================
- */
- #include <a_samp>
- #include <izcmd>
- //==============================================================================
- // Colors
- //==============================================================================
- #define COLOR_RED 0xFF0000
- #define COLOR_GREEN 0x00FF00FF
- #define COLOR_YELLOW 0xFFFF00FF
- #define FILTERSCRIPT
- #if defined FILTERSCRIPT
- //==============================================================================
- // OnFilterScriptInit and OnFilterScriptExit
- //==============================================================================
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" Sanfierro Teleport System by Turbo loaded");
- print("--------------------------------------\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- print("\n--------------------------------------");
- print(" Sanfierro Teleport System by Turbo unloaded");
- print("--------------------------------------\n");
- return 1;
- }
- #endif
- //==============================================================================
- // Commands/functions
- //==============================================================================
- CMD:teleports(playerid,param[])
- {
- ShowPlayerDialog(playerid,1,DIALOG_STYLE_MSGBOX,"Teleport Commands"," /sfairport\t-/sfa\n /drivingschool\t /ds\n /ottocars\t /oc\n /wangcars\t /wc\n /carrier\n /transfender\t /tf\n /gym\n /ammunation\t /ammu\n /sp1\t /sp2 special locations\n /supasave\t /ss\n /hospital\n /archangels\t /arch\n /policedept\t /pd\n /policegarage\t /pg\n /sfbeach\t /sfb\n /paynspray\t /pns","close","");
- return 1;
- }
- CMD:sfairport(playerid,params[])
- {
- //checks whether the player is in any vehicle
- if(IsPlayerInAnyVehicle(playerid))
- {
- new vehicleid = GetPlayerVehicleID(playerid);
- //set vehicle position if he is in a vehicle
- SetVehiclePos(vehicleid,-1534.4138,-75.4995,14.1484,307.1554);
- //Gametext and client message for the player
- SendClientMessage(playerid,COLOR_GREEN,"You have been teleported to sanfierro airport successfully!");
- GameTextForPlayer(playerid, "~b~~h~You have teleported to sf airport!", 3000, 3);
- }
- //if the player is on foot
- else
- {
- SetPlayerPos(playerid,-1534.4138,-75.4995,14.1484,307.1554);//set the player position
- SetPlayerFacingAngle(playerid,180);//set the player facing angle
- SetPlayerInterior(playerid,0);//set the player interior ( so that he wont be bugged if teleported from another interior)eg:teleport from inside the ammunation
- SetCameraBehindPlayer(playerid);//fix the camera position
- //client message and game text
- SendClientMessage(playerid,COLOR_GREEN,"You have been teleported to sanfierro airport successfully!");
- GameTextForPlayer(playerid, "~b~~h~You have teleported to sf airport!", 3000, 3);
- }
- return 1;
- }
- COMMAND:sfa(playerid, params[])
- {
- return cmd_sfairport(playerid, params);
- }
- CMD:wangcars(playerid,params[])
- {
- if(IsPlayerInAnyVehicle(playerid))
- {
- new vehicleid = GetPlayerVehicleID(playerid);
- SetVehiclePos(vehicleid,-1978.0193,276.1283,35.1719,333.1878);
- SendClientMessage(playerid,COLOR_GREEN,"You have been teleported to wangcars successfully!");
- GameTextForPlayer(playerid, "~b~~h~You have teleported to wangcars!", 3000, 3);
- }
- else
- {
- SetPlayerPos(playerid,-1978.0193,276.1283,35.1719,333.1878);
- SetPlayerFacingAngle(playerid,180);
- SetPlayerInterior(playerid,0);
- SetCameraBehindPlayer(playerid);
- SendClientMessage(playerid,COLOR_GREEN,"You have been teleported to wangcars successfully!");
- GameTextForPlayer(playerid, "~b~~h~You have teleported to wangcars!", 3000, 3);
- }
- return 1;
- }
- COMMAND:wc(playerid, params[])
- {
- return cmd_wangcars(playerid, params);
- }
- CMD:ottocars(playerid,params[])
- {
- if(IsPlayerInAnyVehicle(playerid))
- {
- new vehicleid = GetPlayerVehicleID(playerid);
- SetVehiclePos(vehicleid,-1637.3621,1208.9797,7.1797,109.3371);
- SendClientMessage(playerid,COLOR_GREEN,"You have been teleported to ottocars successfully!");
- GameTextForPlayer(playerid, "~b~~h~You have teleported to ottocars!", 3000, 3);
- }
- else
- SetPlayerPos(playerid,-1637.3621,1208.9797,7.1797,109.3371);
- SetPlayerFacingAngle(playerid,180);
- SetPlayerInterior(playerid,0);
- SetCameraBehindPlayer(playerid);
- SendClientMessage(playerid,COLOR_GREEN,"You have been teleported to ottocars successfully!");
- GameTextForPlayer(playerid, "~b~~h~You have teleported to ottocars!", 3000, 3);
- return 1;
- }
- COMMAND:oc(playerid, params[])
- {
- return cmd_ottocars(playerid, params);
- }
- CMD:carrier(playerid,params[])
- {
- if(IsPlayerInAnyVehicle(playerid))
- {
- new vehicleid = GetPlayerVehicleID(playerid);
- SetVehiclePos(vehicleid,-1407.0273,500.6602,18.2294,264.6461);
- SendClientMessage(playerid,COLOR_GREEN,"You have been teleported to aircraft carrier successfully!");
- GameTextForPlayer(playerid, "~b~~h~You have teleported to aircraftcarrier!", 3000, 3);
- }
- else
- SetPlayerPos(playerid,-1407.0273,500.6602,18.2294,264.6461);
- SetPlayerFacingAngle(playerid,180);
- SetPlayerInterior(playerid,0);
- SetCameraBehindPlayer(playerid);
- SendClientMessage(playerid,COLOR_GREEN,"You have been teleported to aircraft carrier successfully!");
- GameTextForPlayer(playerid, "~b~~h~You have teleported to aircraftcarrier!", 3000, 3);
- return 1;
- }
- CMD:transfender(playerid,params[])
- {
- if(IsPlayerInAnyVehicle(playerid))
- {
- new vehicleid = GetPlayerVehicleID(playerid);
- SetVehiclePos(vehicleid,-1936.8915,228.1886,34.1563,349.5553);
- SendClientMessage(playerid,COLOR_GREEN,"You have been teleported to transfender successfully!");
- GameTextForPlayer(playerid, "~b~~h~You have teleported to transfender!", 3000, 3);
- }
- else
- SetPlayerPos(playerid,-1936.8915,228.1886,34.1563,349.5553);
- SetPlayerFacingAngle(playerid,180);
- SetPlayerInterior(playerid,0);
- SetCameraBehindPlayer(playerid);
- SendClientMessage(playerid,COLOR_GREEN,"You have been teleported to transfender successfully!");
- GameTextForPlayer(playerid, "~b~~h~You have teleported to transfender!", 3000, 3);
- return 1;
- }
- COMMAND:tf(playerid, params[])
- {
- return cmd_transfender(playerid, params);
- }
- CMD:gym(playerid,params[])
- {
- if(IsPlayerInAnyVehicle(playerid))
- {
- new vehicleid = GetPlayerVehicleID(playerid);
- SetVehiclePos(vehicleid,-2267.1548,-155.2513,35.3203,95.4838);
- SendClientMessage(playerid,COLOR_GREEN,"You have been teleported to gym successfully!");
- GameTextForPlayer(playerid, "~b~~h~You have teleported to gym!", 3000, 3);
- }
- else
- SetPlayerPos(playerid,-2267.1548,-155.2513,35.3203,95.4838);
- SetPlayerFacingAngle(playerid,180);
- SetPlayerInterior(playerid,0);
- SetCameraBehindPlayer(playerid);
- SendClientMessage(playerid,COLOR_GREEN,"You have been teleported to gym successfully!");
- GameTextForPlayer(playerid, "~b~~h~You have teleported to gym!", 3000, 3);
- return 1;
- }
- CMD:drivingschool(playerid,params[])
- {
- if(IsPlayerInAnyVehicle(playerid))
- {
- new vehicleid = GetPlayerVehicleID(playerid);
- SetVehiclePos(vehicleid,-2027.8280,-97.9614,35.1641,184.5735);
- SendClientMessage(playerid,COLOR_GREEN,"You have been teleported to driving school successfully!");
- GameTextForPlayer(playerid, "~b~~h~You have teleported to driving school!", 3000, 3);
- }
- else
- SetPlayerPos(playerid,-2027.8280,-97.9614,35.1641,184.5735);
- SetPlayerFacingAngle(playerid,180);
- SetPlayerInterior(playerid,0);
- SetCameraBehindPlayer(playerid);
- SendClientMessage(playerid,COLOR_GREEN,"You have been teleported to driving school successfully!");
- GameTextForPlayer(playerid, "~b~~h~You have teleported to driving school!", 3000, 3);
- return 1;
- }
- COMMAND:ds(playerid, params[])
- {
- return cmd_drivingschool(playerid, params);
- }
- //==============================================================================
- // Every thing below this is added in Version v1.5
- //==============================================================================
- CMD:ammunation(playerid,params[])
- {
- if(IsPlayerInAnyVehicle(playerid))
- {
- new vehicleid = GetPlayerVehicleID(playerid);
- SetVehiclePos(vehicleid,-2625.4011,214.3997,4.4840,3.9662);
- SendClientMessage(playerid,COLOR_GREEN,"You have been teleported to ammunation successfully!");
- GameTextForPlayer(playerid, "~b~~h~You have teleported to ammunation!", 3000, 3);
- }
- else
- SetPlayerPos(playerid,-2625.4011,214.3997,4.4840,3.9662);
- SetPlayerFacingAngle(playerid,180);
- SetPlayerInterior(playerid,0);
- SetCameraBehindPlayer(playerid);
- SendClientMessage(playerid,COLOR_GREEN,"You have been teleported to ammunation successfully!");
- GameTextForPlayer(playerid, "~b~~h~You have teleported to ammunation!", 3000, 3);
- return 1;
- }
- COMMAND:ammu(playerid, params[])
- {
- return cmd_ammunation(playerid, params);
- }
- CMD:hospital(playerid,params[])
- {
- if(IsPlayerInAnyVehicle(playerid))
- {
- new vehicleid = GetPlayerVehicleID(playerid);
- SetVehiclePos(vehicleid,-2657.2666,609.5692,14.4531,182.6165);
- SendClientMessage(playerid,COLOR_GREEN,"You have been teleported to hospital successfully!");
- GameTextForPlayer(playerid, "~b~~h~You have teleported to hospital!", 3000, 3);
- }
- else
- SetPlayerPos(playerid,-2657.2666,609.5692,14.4531,182.6165);
- SetPlayerFacingAngle(playerid,180);
- SetPlayerInterior(playerid,0);
- SetCameraBehindPlayer(playerid);
- SendClientMessage(playerid,COLOR_GREEN,"You have been teleported to hospital successfully!");
- GameTextForPlayer(playerid, "~b~~h~You have teleported to hospital!", 3000, 3);
- return 1;
- }
- COMMAND:ss(playerid, params[])
- {
- return cmd_supasave(playerid, params);
- }
- CMD:supasave(playerid,params[])
- {
- if(IsPlayerInAnyVehicle(playerid))
- {
- new vehicleid = GetPlayerVehicleID(playerid);
- SetVehiclePos(vehicleid,-2442.4526,746.7072,35.0156,174.5741);
- SendClientMessage(playerid,COLOR_GREEN,"You have been teleported to supasave successfully!");
- GameTextForPlayer(playerid, "~b~~h~You have teleported to supasave!", 3000, 3);
- }
- else
- SetPlayerPos(playerid,-2442.4526,746.7072,35.0156,174.5741);
- SetPlayerFacingAngle(playerid,180);
- SetPlayerInterior(playerid,0);
- SetCameraBehindPlayer(playerid);
- SendClientMessage(playerid,COLOR_GREEN,"You have been teleported to supasave successfully!");
- GameTextForPlayer(playerid, "~b~~h~You have teleported to supasave!", 3000, 3);
- return 1;
- }
- CMD:archangels(playerid,params[])
- {
- if(IsPlayerInAnyVehicle(playerid))
- {
- new vehicleid = GetPlayerVehicleID(playerid);
- SetVehiclePos(vehicleid,-2709.5054,217.1762,4.1797,89.9039);
- SendClientMessage(playerid,COLOR_GREEN,"You have been teleported to wheels arch angles successfully!");
- GameTextForPlayer(playerid, "~b~~h~You have teleported to wheelsarch angels!", 3000, 3);
- }
- else
- SetPlayerPos(playerid,-2709.5054,217.1762,4.1797,89.9039);
- SetPlayerFacingAngle(playerid,180);
- SetPlayerInterior(playerid,0);
- SetCameraBehindPlayer(playerid);
- SendClientMessage(playerid,COLOR_GREEN,"You have been teleported to wheels arch angles successfully!");
- GameTextForPlayer(playerid, "~b~~h~You have teleported to wheelsarch angels!", 3000, 3);
- return 1;
- }
- COMMAND:arch(playerid, params[])
- {
- return cmd_archangels(playerid, params);
- }
- CMD:sfbeach(playerid,params[])
- {
- if(IsPlayerInAnyVehicle(playerid))
- {
- new vehicleid = GetPlayerVehicleID(playerid);
- SetVehiclePos(vehicleid,-2876.0486,39.5524,5.8323,114.2606);
- SendClientMessage(playerid,COLOR_GREEN,"You have been teleported to sanfierro beach successfully!");
- GameTextForPlayer(playerid, "~b~~h~You have teleported to sanfierro beach!", 3000, 3);
- }
- else
- SetPlayerPos(playerid,-2876.0486,39.5524,5.8323,114.2606);
- SetPlayerFacingAngle(playerid,180);
- SetPlayerInterior(playerid,0);
- SetCameraBehindPlayer(playerid);
- SendClientMessage(playerid,COLOR_GREEN,"You have been teleported to sanfierro beach successfully!");
- GameTextForPlayer(playerid, "~b~~h~You have teleported to sanfierro beach!", 3000, 3);
- return 1;
- }
- COMMAND:sfb(playerid, params[])
- {
- return cmd_sfbeach(playerid, params);
- }
- CMD:paynspray(playerid,params[])
- {
- if(IsPlayerInAnyVehicle(playerid))
- {
- new vehicleid = GetPlayerVehicleID(playerid);
- SetVehiclePos(vehicleid,-2427.0522,1039.0316,50.3906,174.3443);
- SendClientMessage(playerid,COLOR_GREEN,"You have been teleported to pay n spray successfully!");
- GameTextForPlayer(playerid, "~b~~h~You have teleported to pan n spray!", 3000, 3);
- }
- else
- SetPlayerPos(playerid,-2427.0522,1039.0316,50.3906,174.3443);
- SetPlayerFacingAngle(playerid,180);
- SetPlayerInterior(playerid,0);
- SetCameraBehindPlayer(playerid);
- SendClientMessage(playerid,COLOR_GREEN,"You have been teleported to pay n spray successfully!");
- GameTextForPlayer(playerid, "~b~~h~You have teleported to pan n spray!", 3000, 3);
- return 1;
- }
- COMMAND:pns(playerid, params[])
- {
- return cmd_paynspray(playerid, params);
- }
- CMD:policedept(playerid,params[])
- {
- if(IsPlayerInAnyVehicle(playerid))
- {
- new vehicleid = GetPlayerVehicleID(playerid);
- SetVehiclePos(vehicleid,-1605.5829,719.7681,11.9747,8.0200);
- SendClientMessage(playerid,COLOR_GREEN,"You have been teleported to police department successfully!");
- GameTextForPlayer(playerid, "~b~~h~You have teleported to police department!", 3000, 3);
- }
- else
- SetPlayerPos(playerid,-1605.5829,719.7681,11.9747,8.0200);
- SetPlayerFacingAngle(playerid,180);
- SetPlayerInterior(playerid,0);
- SetCameraBehindPlayer(playerid);
- SendClientMessage(playerid,COLOR_GREEN,"You have been teleported to police department successfully!");
- GameTextForPlayer(playerid, "~b~~h~You have teleported to police department!", 3000, 3);
- return 1;
- }
- COMMAND:pd(playerid, params[])
- {
- return cmd_policedept(playerid, params);
- }
- CMD:policegarage(playerid,params[])
- {
- if(IsPlayerInAnyVehicle(playerid))
- {
- new vehicleid = GetPlayerVehicleID(playerid);
- SetVehiclePos(vehicleid,-1631.6488,683.2217,-5.2422,251.1443);
- SendClientMessage(playerid,COLOR_GREEN,"You have been teleported to police garage successfully!");
- GameTextForPlayer(playerid, "~b~~h~You have teleported to police garage!", 3000, 3);
- }
- else
- SetPlayerPos(playerid,-1631.6488,683.2217,-5.2422,251.1443);
- SetPlayerFacingAngle(playerid,180);
- SetPlayerInterior(playerid,0);
- SetCameraBehindPlayer(playerid);
- SendClientMessage(playerid,COLOR_GREEN,"You have been teleported to police garage successfully!");
- GameTextForPlayer(playerid, "~b~~h~You have teleported to police garage!", 3000, 3);
- return 1;
- }
- COMMAND:pg(playerid, params[])
- {
- return cmd_policegarage(playerid, params);
- }
- CMD:sp1(playerid,params[])
- {
- if(IsPlayerInAnyVehicle(playerid))
- {
- SendClientMessage(playerid,COLOR_RED,"Error:You can't use this teleport command while in a vehicle");
- SendClientMessage(playerid,COLOR_RED,"Exit your vehicle first");
- GameTextForPlayer(playerid, "~b~~h~Please exit your vehicle before using this command!", 3000, 3);
- }
- else
- SetPlayerPos(playerid,-1374.4679,670.9106,84.0078,308.5341);
- SetPlayerFacingAngle(playerid,180);
- SetPlayerInterior(playerid,0);
- SetCameraBehindPlayer(playerid);
- SendClientMessage(playerid,COLOR_GREEN,"You have been teleported to a special location successfully!");
- GameTextForPlayer(playerid, "~b~~h~You have teleported to a special location!", 3000, 3);
- return 1;
- }
- CMD:sp2(playerid,params[])
- {
- if(IsPlayerInAnyVehicle(playerid))
- {
- SendClientMessage(playerid,COLOR_RED,"Error:You can't use this teleport command while in a vehicle");
- SendClientMessage(playerid,COLOR_RED,"Exit your vehicle first");
- GameTextForPlayer(playerid, "~b~~h~Please exit your vehicle before using this command!", 3000, 3);
- }
- else
- SetPlayerPos(playerid,-1531.3356,686.7694,133.0514,136.2212);
- SetPlayerFacingAngle(playerid,180);
- SetPlayerInterior(playerid,0);
- SetCameraBehindPlayer(playerid);
- SendClientMessage(playerid,COLOR_GREEN,"You have been teleported to a special location successfully!");
- GameTextForPlayer(playerid, "~b~~h~You have teleported to a special location!", 3000, 3);
- return 1;
- }
- CMD:thelp(playerid,params[])
- {
- ShowPlayerDialog(playerid,2,DIALOG_STYLE_MSGBOX,"Teleport Help","Use /teleports to see the avaliable place\n Use /tcredits to see the credits\n Use /thelp to see the help dialog(you are currently reading it)","close","");
- SendClientMessage(playerid,COLOR_YELLOW,"You are viewing the teleport help");
- return 1;
- }
- CMD:tcredits(playerid,param[])
- {
- ShowPlayerDialog(playerid,3,DIALOG_STYLE_MSGBOX,"Teleport system credits","This teleport system was made from scratch by Turbo\n Special thanks to:\t Yashas for I-ZCMD\t(fastest command proccesser) edit of zcmd\n Zeex for original ZCMD","close");
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement