Hello! You also want a mileage system running. Please!
http://forum.vc-mp.org/?topic=4353.0
Not speedometer. Mileague. Example : 22.000km traveled.
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 (http://wiki.vc-mp.org/wiki/Scripting/Squirrel/Functions/DistanceFromPoint) function. Just set you pos when entering the vehilcle and call this function on vehicle exit.
Quote from: Decent_946 on Jul 23, 2017, 04:16 PMQuote 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 (http://wiki.vc-mp.org/wiki/Scripting/Squirrel/Functions/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)
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.
Using timers? What are you? onVehicleMove exists, if you want accuracy. And, running timers won't be laggy and "memory-consuming".
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.
Squirrel is laggy
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.
Quote from: NicusorN5 on Jul 24, 2017, 04:45 PMQuote 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
(https://forum.vc-mp.org/proxy.php?request=http%3A%2F%2Fi66.tinypic.com%2F2co28sz.png&hash=a68c703741411d84d768a4bc65f585806251bdba)
Life for Vcmp <3
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.
Quote from: Cool on Jul 24, 2017, 05:36 PMQuote from: NicusorN5 on Jul 24, 2017, 04:45 PMQuote 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.
Quote from: NicusorN5 on Jul 24, 2017, 07:39 PMQuote from: Cool on Jul 24, 2017, 05:36 PMQuote from: NicusorN5 on Jul 24, 2017, 04:45 PMQuote 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.
SAMP is pretty boring for me. VCMP is more interesting, but MTA is best :x. No, wait, CS wins.
Quote from: Thijn on Jul 24, 2017, 08:21 PMQuote from: NicusorN5 on Jul 24, 2017, 07:39 PMQuote from: Cool on Jul 24, 2017, 05:36 PMQuote from: NicusorN5 on Jul 24, 2017, 04:45 PMQuote 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.
lol I agree.
Quote from: KAKAN on Jul 25, 2017, 09:00 AMSAMP is pretty boring for me. VCMP is more interesting, but MTA is best :x. No, wait, CS wins.
I think SA:MP is only a little bit better than VC:MP. But MTA:SA is much more better than SA:MP.
I love the resources system and the sharing of them true community in mta. this challenges scripters
Unfortunaly it isnt developped for vc, wich is my alltime fav :)
Quote from: NicusorN5 on Jul 24, 2017, 04:45 PMQuote 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.
You know there are much more complex things being done each frame, right? Such as rendering, input processing, game logic, etc.. and all of these use loops of various complexities and I don't think you can get even close to that without very shoddy coding (such as, infinite loops, running sql queries per frame, stuff like that). Please learn more about it after advicing people, it's of no good for either of us.
Please help me to add mileage system on my server, please!