SetVehiclePos - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: SetVehiclePos (
/showthread.php?tid=72187)
SetVehiclePos -
lennard - 06.04.2009
SetvehiclePos work only when a player used the car. How can i set the Car used?
Re: SetVehiclePos -
lennard - 06.04.2009
Work it with SetVehicleToReSpawn
Re: SetVehiclePos -
Kinetic - 06.04.2009
You can use SetVehiclePos anytime, you just need the vehicleid.
Re: SetVehiclePos -
lennard - 06.04.2009
https://sampwiki.blast.hk/wiki/SetVehiclePos
Quote:
Important note: This function ONLY works if someone has been in the vehicle since it spawn.
|
Re: SetVehiclePos -
Kinetic - 06.04.2009
Quote:
Originally Posted by lennard
|
pawn Код:
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;
}
happy?
:P :P :P :P :P :P
Re: SetVehiclePos -
NeRoSiS - 06.04.2009
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.
Re: SetVehiclePos -
Kinetic - 06.04.2009
Quote:
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.
|
I know that you would need playerid 0 online, I was just showing that its still possible.