Guest User

/settele and /gototele

a guest
Nov 23rd, 2014
388
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.35 KB | None | 0 0
  1. CMD:settele(playerid, params[])
  2. {
  3.     if(IsPlayerAdmin(playerid)) // var can be changed // remove for stunt servers
  4.     {
  5.         GetPlayerPos(playerid, TeleportDest[playerid][0],TeleportDest[playerid][1],TeleportDest[playerid][2]);
  6.         SendClientMessage(playerid, COLOR_WHITE, "Teleport destination set!");
  7.     }
  8.     else
  9.     {
  10.         SendClientMessage(playerid, COLOR_WHITE, "   You are not authorized to use that command !"); // remove 4 stunt srvr
  11.     }
  12.     return 1;
  13. }
  14.  
  15. CMD:gototele(playerid, params[])
  16. {
  17.     if(IsPlayerAdmin(playerid)) // var can be changed // remove 4 stunt servers
  18.     {
  19.         if(TeleportDest[playerid][0] == 0.0 && TeleportDest[playerid][1] == 0.0 && TeleportDest[playerid][2] == 0.0) {
  20.             SendClientMessage(playerid, COLOR_WHITE, " You need to mark your teleport first by using /settele");
  21.             return 1;
  22.         }
  23.         if(GetPlayerState(playerid) == 2)
  24.         {
  25.             new tmpcar = GetPlayerVehicleID(playerid);
  26.             SetVehiclePos(tmpcar, TeleportDest[playerid][0],TeleportDest[playerid][1],TeleportDest[playerid][2]);
  27.         }
  28.         else
  29.         {
  30.             SetPlayerPos(playerid, TeleportDest[playerid][0],TeleportDest[playerid][1],TeleportDest[playerid][2]);
  31.         }
  32.         displayCenterHUDInfo(playerid,  "~r~Teleporting!", 8);
  33.         SetPlayerInterior(playerid,0);
  34.     }
  35.     else
  36.     {
  37.         SendClientMessage(playerid, COLOR_WHITE, "   You are not authorized to use that command !"); //remove 4 stunt srvr
  38.     }
  39.     return 1;
  40. }
Advertisement
Add Comment
Please, Sign In to add comment