Posts: 79
Threads: 15
Joined: Nov 2014
Reputation:
0
hi.
i'll make a cmd for keep (dont fall) player on (from) vehicle roof.
i try it by setplayerpos but this dont work correctly.
if maybe help me with setplayervelocity
Posts: 532
Threads: 12
Joined: Oct 2013
Reputation:
0
You want the player to surf on a vehicle without falling? Using setplayerposition would work but it would look like crap because even if you update every 10th of a second it would still lag. Using playervelocity does not change anything since you would have to update the velocity positioning if the vehicle change direction and also based on speed... Why do you even want a player to be able to do this? There is no native way to attach players to objects/vehicles.
Posts: 79
Threads: 15
Joined: Nov 2014
Reputation:
0
i see this in a server.
player by a cmd keeps on vehicle when vehicle has speed , player is keep on vehicle and dont apart from vehicle
Posts: 449
Threads: 20
Joined: Mar 2012
Reputation:
0
I guess you can get the player's position using GetPlayerPos and then get the position of the vehicle he is surfing with GetVehiclePos and then make a timer to set the player's position on top of the vehicle.
Something like :
SetPlayerPos = GetVehiclePos(x, y, z+1)
This is just an idea, not sure if it would work.
Posts: 79
Threads: 15
Joined: Nov 2014
Reputation:
0
i try this in OnPlayerUpdate but it dont work correctly. problem with it : player become about freeze and he cant use anims and it is lag.
i saw this in a server correctly.
may i use SetPlayerViceCity for it ?
Posts: 79
Threads: 15
Joined: Nov 2014
Reputation:
0
i try it by setplayervelocity in OnPlayerUpdate but it is need more update and faster
Posts: 194
Threads: 29
Joined: Jul 2013
Reputation:
0
Why not use a timer instead? 100 Miliseconds timer? instead of OnPlayerUpdate..