Velocity
#1

Is there a anyway to increase the velocity of car while driving by adding the velocity? If u can't understand then take this like, I want to fit 10 nitro boost in every vehicle!
Reply
#2

What the hell?
Reply
#3

https://sampwiki.blast.hk/wiki/SetPlayerVelocity
Reply
#4

Quote:
Originally Posted by Aerotactics
Посмотреть сообщение
The problem is i don't know how to find the direction of vehicle in which it is running.
If I add x+0.1 or y+0.1 or z+0.1 then it won't go straight everytime. And By the way, i want to increase vehicle velocity not Player velocity.

EDIT: I think that it will be possible by GetVehicleZAngle, but idk how.
Reply
#5

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

The Y-value is forward.
Reply
#6

Let me check.

EDIT: Not working
Reply
#7

pawn Код:
new Float:vx, Float:vy, Float:vz;
GetVehicleVelocity(GetPlayerVehicleID(playerid), vx, vy, vz);
SetVehicleVelocity(GetPlayerVehicleID(playerid), vx*2, vy*2, vz*2);
AddVehicleComponent(GetPlayerVehicleID(playerid), 1010);
//change 2 to speed that you want.
Reply
#8

Код:
SetVehicleVelocity(GetPlayerVehicleID(playerid), vx*2, vy*2, vz*2);
Why are you multiplying each variable by 2? Variable Y is forward momentum.
Reply
#9

Thanks Newbienoob +Rep!
Reply
#10

no Y is north/south X is east/west and z is up and down
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)