Running System Kilometer/Mileage Request

Started by SilviUDaciaLogan, Jul 22, 2017, 10:22 AM

Previous topic - Next topic

SilviUDaciaLogan

Hello! You also want a mileage  system running. Please!

MatheuS

if( !sucess ) tryAgain();
Thanks to the VCMP community. It was the happiest period of my life.

SilviUDaciaLogan

Not speedometer.  Mileague. Example : 22.000km traveled.

Decent_946

Quote from: SilviUDaciaLogan on Jul 22, 2017, 11:43 AMNot speedometer.  Mileague. Example : 22.000km traveled.
Vcmp vehicles doesn't have got ' Mileague '  because there isn't petrol system to tell you that this vehicle will travel *dash* kilometeres in 1 litre of petrol. Although it can be made possible if you script fuel / petrol system.

If you want to know the distance you travelled since the time you entered the car till the time you exit, i guess, you can use DistanceFromPoint function. Just set you pos when entering the vehilcle and call this function on vehicle exit.

NicusorN5

Quote from: Decent_946 on Jul 23, 2017, 04:16 PM
Quote from: SilviUDaciaLogan on Jul 22, 2017, 11:43 AMNot speedometer.  Mileague. Example : 22.000km traveled.
Vcmp vehicles doesn't have got ' Mileague '  because there isn't petrol system to tell you that this vehicle will travel *dash* kilometeres in 1 litre of petrol. Although it can be made possible if you script fuel / petrol system.

If you want to know the distance you travelled since the time you entered the car till the time you exit, i guess, you can use DistanceFromPoint function. Just set you pos when entering the vehilcle and call this function on vehicle exit.
It can be done using timers (can be laggy , and memory-consuming)

Decent_946

Quote from: NicusorN5 on Jul 23, 2017, 05:22 PMIt can be done using timers (can be laggy , and memory-consuming)
that's what i said. It can be done. But not already present in VC-MP.

KAKAN

Using timers? What are you? onVehicleMove exists, if you want accuracy. And, running timers won't be laggy and "memory-consuming".
oh no

NicusorN5

Quote from: KAKAN on Jul 24, 2017, 08:53 AMUsing timers? What are you? onVehicleMove exists, if you want accuracy. And, running timers won't be laggy and "memory-consuming".
onVehicleMove is called every frame a vehicle moves. That would be worse.
For Timers, i was talking for low-end computers (most VCMP players have these). You guys should move to SAMP and MTA, since they are more popular, and bulid a computer that runs them on good framerate.

Xmair


Credits to Boystang!

VU Full Member | VCDC 6 Coordinator & Scripter | EG A/D Contributor | Developer of VCCNR | Developer of KTB | Ex-Scripter of EAD

vito1

Quote from: NicusorN5 on Jul 24, 2017, 04:45 PMi was talking for low-end computers (most VCMP players have these). You guys should move to SAMP and MTA, since they are more popular, and bulid a computer that runs them on good framerate.
such "low-end" PCs as vc-mp players using to play is unable to run MTA/SAMP on 30fps.

 

Cool

Quote from: NicusorN5 on Jul 24, 2017, 04:45 PM
Quote from: KAKAN on Jul 24, 2017, 08:53 AMUsing timers? What are you? onVehicleMove exists, if you want accuracy. And, running timers won't be laggy and "memory-consuming".
onVehicleMove is called every frame a vehicle moves. That would be worse.
For Timers, i was talking for low-end computers (most VCMP players have these). You guys should move to SAMP and MTA, since they are more popular, and bulid a computer that runs them on good framerate.
did some one asked to suggest some other good games? i love Vcmp and i dont care about new and popular games

Life for Vcmp <3

aXXo

Try onGameKeysChange.
Check if the player is in a vehicle && pressed the accelerator key. Record the timestamp = time()
Check if the player is in a vehicle && released the accelerator key. Record the time() - timestamp, so you get the number of seconds the accelerator was throttled. Calculate the mileage accordingly.

NicusorN5

Quote from: Cool on Jul 24, 2017, 05:36 PM
Quote from: NicusorN5 on Jul 24, 2017, 04:45 PM
Quote from: KAKAN on Jul 24, 2017, 08:53 AMUsing timers? What are you? onVehicleMove exists, if you want accuracy. And, running timers won't be laggy and "memory-consuming".
onVehicleMove is called every frame a vehicle moves. That would be worse.
For Timers, i was talking for low-end computers (most VCMP players have these). You guys should move to SAMP and MTA, since they are more popular, and bulid a computer that runs them on good framerate.
did some one asked to suggest some other good games? i love Vcmp and i dont care about new and popular games
Life for Vcmp <3
Nah, it's slowly dying... Samp has more players and it's better thatn vcmp.

Thijn

Quote from: NicusorN5 on Jul 24, 2017, 07:39 PM
Quote from: Cool on Jul 24, 2017, 05:36 PM
Quote from: NicusorN5 on Jul 24, 2017, 04:45 PM
Quote from: KAKAN on Jul 24, 2017, 08:53 AMUsing timers? What are you? onVehicleMove exists, if you want accuracy. And, running timers won't be laggy and "memory-consuming".
onVehicleMove is called every frame a vehicle moves. That would be worse.
For Timers, i was talking for low-end computers (most VCMP players have these). You guys should move to SAMP and MTA, since they are more popular, and bulid a computer that runs them on good framerate.
did some one asked to suggest some other good games? i love Vcmp and i dont care about new and popular games
Life for Vcmp <3
Nah, it's slowly dying... Samp has more players and it's better thatn vcmp.
For most people here SA:MP is not even close as fun as VC:MP.

KAKAN

SAMP is pretty boring for me. VCMP is more interesting, but MTA is best :x. No, wait, CS wins.
oh no