Advertisement
Guest User

sendvehicletoplayer.inc

a guest
Feb 5th, 2014
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. // Abagail's SendVehicleToPlayer - Include Version 2 //
  2.  
  3. stock SendVehicleToPlayer(vehid, playerid, putin = -1) {
  4. new Float: x, Float: y, Float: z;
  5. GetPlayerPos(playerid, x, y, z);
  6. new vw = GetPlayerVirtualWorld(playerid);
  7. new int = GetPlayerInterior(playerid);
  8. SetVehiclePosEx(vehid, x, y, z, vw, int);
  9. if(putin = -1) return 1;
  10. if(putin = 1) return PutPlayerInVehicle(playerid, vehid);
  11. return 1;
  12. }
  13.  
  14. stock SetVehiclePosEx(id, float: x, float: y, float: z, vw, int) // id = VehicleID, X, X Coords, Y, Coords, Z, Coords, VW = Virtual World, Int = Interior
  15. {
  16. SetVehiclePos(id, x, y, z);
  17. LinkVehicleToInterior(id, int);
  18. SetPlayerVirtualWorld(id, vw);
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement