SetVehiclePos
#1

SetvehiclePos work only when a player used the car. How can i set the Car used?
Reply
#2

Work it with SetVehicleToReSpawn
Reply
#3

You can use SetVehiclePos anytime, you just need the vehicleid.
Reply
#4

https://sampwiki.blast.hk/wiki/SetVehiclePos


Quote:

Important note: This function ONLY works if someone has been in the vehicle since it spawn.

Reply
#5

Quote:
Originally Posted by lennard
https://sampwiki.blast.hk/wiki/SetVehiclePos


Quote:

Important note: This function ONLY works if someone has been in the vehicle since it spawn.

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
Reply
#6

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.
Reply
#7

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)