Create vehicle and putplayerinvehicle - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Create vehicle and putplayerinvehicle (
/showthread.php?tid=575031)
Create vehicle and putplayerinvehicle -
Banditukas - 23.05.2015
Hi,
I'am creating vehicle and i want instantly put player in vehicle can i do that or i need set timer?
Re: Create vehicle and putplayerinvehicle -
Alpay0098 - 23.05.2015
I can't get what you're saying. But I think it can be helpful :
https://sampwiki.blast.hk/wiki/PutPlayerInVehicle
Re: Create vehicle and putplayerinvehicle -
Ghazal - 23.05.2015
Try this.
pawn Код:
new Float:x, Float:y, Float:z, Float:a, vsID, vehicle; // defines variables which we will use
vehicle = CreateVehicle(415, x, y, z, a, 1, 1, 600000); // creates the vehicle
LinkVehicleToInterior(vehicle, GetPlayerInterior(playerid)); // links the vehicle to the player interior
SetVehicleVirtualWorld(vehicle, GetPlayerVirtualWorld(playerid)); // link the virtual world to player interior
PutPlayerInVehicle(playerid, vehicle, 0); // puts the player in the vehicle.