KillamanLecce

GotoPlayer Function by Killaman for SA:MP

Aug 17th, 2012
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.04 KB | None | 0 0
  1. /*
  2. ______________________________________________________________________________________________________________
  3. +FUNZIONE: GotoPlayer(playerid, Float:x, Float:y, Float:z, Interior, VirtualWorld);
  4. +AUTORE: Killaman
  5. +SITO: MultiplayerArena.it
  6. __________________________________NOTE:
  7. Questa funzione è stata creata da Killaman e setta la posizione di un determinato player, l'Interior e il Virtual World. Setta queste cose anche se il player è in un determinato veicolo.
  8. ______________________________________________________________________________________________________________
  9. */
  10.  
  11. stock GotoPlayer(playerid, Float:x, Float:y, Float:z, Interior, VirtualWorld)
  12. {
  13.     if (GetPlayerState(playerid) == 2)
  14.     {
  15.         new
  16.             vehicleid = GetPlayerVehicleID(playerid);
  17.         SetVehiclePos(vehicleid, x, y, z);
  18.         LinkVehicleToInterior(vehicleid, Interior);
  19.         SetVehicleVirtualWorld(vehicleid, VirtualWorld);
  20.     }
  21.     else
  22.     {
  23.         SetPlayerPos(playerid, x, y, z);
  24.         SetPlayerInterior(playerid, Interior);
  25.         SetPlayerVirtualWorld(playerid, VirtualWorld);
  26.     }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment