Jakwob-WG

[SNIPPET] Gotopos

Oct 11th, 2014
307
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.74 KB | None | 0 0
  1. CMD:gotopos(playerid, params[])
  2. {
  3.     new Float:PosX, Float:PosY, Float:PosZ, name[MAX_PLAYER_NAME];
  4.     GetPlayerName(playerid, name, sizeof(name));
  5.     if(sscanf(params, "fff", PosX, PosY, PosZ)) return SendClientMessage(playerid, Orange, "Usage: {33CCFF}/gotopos {FFFFFF}x, y, z");
  6.     {
  7.         if(IsPlayerInAnyVehicle(playerid))
  8.         {
  9.             SetVehiclePos(GetPlayerVehicleID(playerid), PosX, PosY, PosZ);
  10.         }
  11.         else
  12.         {
  13.             SetPlayerPos(playerid, PosX, PosY, PosZ);
  14.         }
  15.         new posstring[128];
  16.         format(posstring, sizeof(posstring), "**  %s {33CCFF}has teleported to {AFAFAF}%f, %f, %f  {FF9900}**",name, PosX, PosY, PosZ);
  17.         MsgAll(0xFF9900AA, posstring);
  18.         SetPlayerInterior(playerid,0);
  19.     }
  20.     return 1;
Advertisement
Add Comment
Please, Sign In to add comment