04.05.2014, 08:07
Hello,
where do i put some explosions when the vehicle speed is 30 KpH ??
thanks
where do i put some explosions when the vehicle speed is 30 KpH ??
thanks
You don't know what you are talking about, OPU gets called a very large and unpredictable number of times per second, which is unnecessary for this. (Imagine calculating speed of vehicles 20 - 30 times per second)
You need to calculate the speed of the vehicle under a per second timer (I don't really see a 500ms timer required) and then check if the speed is more than 30, if yes, get the position and create explosions where necessary. You can look at this thread for information about vehicle speeds. |
I'm sure this will get you in the right way:
https://sampwiki.blast.hk/wiki/SetTimer https://sampwiki.blast.hk/wiki/GetVehicleVelocity https://sampwiki.blast.hk/wiki/CreateExplosion And this thread for getting the right speed |