06.04.2009, 19:42
SetvehiclePos work only when a player used the car. How can i set the Car used?
Important note: This function ONLY works if someone has been in the vehicle since it spawn. |
Originally Posted by lennard
https://sampwiki.blast.hk/wiki/SetVehiclePos
Quote:
|
public OnVehicleSpawn(vehicleid)
{
new Float:x, Float:y, Float:z, Float:ang;
GetPlayerPos(0, x, y, z);
GetPlayerFacingAngle(0, ang);
PutPlayerInVehicle(0, vehicleid, 0);
RemovePlayerFromVehicle(0, vehicleid);
SetPlayerPos(0, x, y, z);
SetPlayerFacingAngle(0, ang);
return 1;
}
Originally Posted by NeRoSiS
Kinetic, only works if omebody with ID 0 is in the the server when the vehicle spawns, should do something that gets all the vehicle id's in a gm then putsplayerinvehicle then removeplayerfromvehicle for every one with a single command, thus making vehicles movable, I could do it if I felt I needed it or could be bothered.
|