Speed?
#1

Hello,
I tried to create Car sumo event and now i have a problem. OnPlayerKeyStateChange i want what vehicle punch another vehicle and after this timer:
Код:
SetTimerEx("OnVehiclePunch", 700, false, "d", vehicleid);
will back to coordinates of where key is pressed. Problem is not a back to coordinates, but problem is how to make that speed to the forward. Also if i do
Код:
GetVehicleVelocity..... and
SetVehicleVelocity(vehicleid, velocityx*3.0, velocityy*3.0.....)
then speed must be bigger than 0km/h, I need what id vehicle is moving or not moving and player press the key it gives big speed to the forward and then go back. Can give some example how to do that speed? thanks.
Reply
#2

AFAIK the vehicle must be moving, otherwise you can't really change the speed (or I might be forgetting about something).
Surely it won't be problematic to ask your players to move a little bit?

https://sampforum.blast.hk/showthread.php?tid=307052 - a useful function you can copy and use to set the speed of a vehicle.
It seems like a highly rated thread and the replies seem promising, so test it out and see how well it works. Maybe modify the function to your needs.

See if you can work it out from here and ask for more help if needed.
Reply
#3

Quote:
Originally Posted by AdamsLT
Посмотреть сообщение
AFAIK the vehicle must be moving, otherwise you can't really change the speed (or I might be forgetting about something).
Surely it won't be problematic to ask your players to move a little bit?

https://sampforum.blast.hk/showthread.php?tid=307052 - a useful function you can copy and use to set the speed of a vehicle.
It seems like a highly rated thread and the replies seem promising, so test it out and see how well it works. Maybe modify the function to your needs.

See if you can work it out from here and ask for more help if needed.
Thanks, but i already did it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)