Vice City: Multiplayer

Server Development => Scripting and Server Management => Script and Content Requests => Topic started by: SilviUDaciaLogan on Jul 22, 2017, 10:22 AM

Title: Running System Kilometer/Mileage Request
Post by: SilviUDaciaLogan on Jul 22, 2017, 10:22 AM
Hello! You also want a mileage  system running. Please!
Title: Re: Running System Kilometer/Mileage Request
Post by: MatheuS on Jul 22, 2017, 11:14 AM
http://forum.vc-mp.org/?topic=4353.0
Title: Re: Running System Kilometer/Mileage Request
Post by: SilviUDaciaLogan on Jul 22, 2017, 11:43 AM
Not speedometer.  Mileague. Example : 22.000km traveled.
Title: Re: Running System Kilometer/Mileage Request
Post by: 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 (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.
Title: Re: Running System Kilometer/Mileage Request
Post by: NicusorN5 on Jul 23, 2017, 05:22 PM
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 (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)
Title: Re: Running System Kilometer/Mileage Request
Post by: Decent_946 on Jul 23, 2017, 07:52 PM
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.
Title: Re: Running System Kilometer/Mileage Request
Post by: KAKAN on Jul 24, 2017, 08:53 AM
Using timers? What are you? onVehicleMove exists, if you want accuracy. And, running timers won't be laggy and "memory-consuming".
Title: Re: Running System Kilometer/Mileage Request
Post by: 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.
Title: Re: Running System Kilometer/Mileage Request
Post by: Xmair on Jul 24, 2017, 05:06 PM
Squirrel is laggy
Title: Re: Running System Kilometer/Mileage Request
Post by: vito1 on Jul 24, 2017, 05:11 PM
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.

 
Title: Re: Running System Kilometer/Mileage Request
Post by: 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
(https://forum.vc-mp.org/proxy.php?request=http%3A%2F%2Fi66.tinypic.com%2F2co28sz.png&hash=a68c703741411d84d768a4bc65f585806251bdba)
Life for Vcmp <3
Title: Re: Running System Kilometer/Mileage Request
Post by: aXXo on Jul 24, 2017, 07:16 PM
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.
Title: Re: Running System Kilometer/Mileage Request
Post by: 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.
Title: Re: Running System Kilometer/Mileage Request
Post by: Thijn on Jul 24, 2017, 08:21 PM
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.
Title: Re: Running System Kilometer/Mileage Request
Post by: KAKAN on Jul 25, 2017, 09:00 AM
SAMP is pretty boring for me. VCMP is more interesting, but MTA is best :x. No, wait, CS wins.
Title: Re: Running System Kilometer/Mileage Request
Post by: NicusorN5 on Jul 25, 2017, 10:25 AM
Quote from: Thijn on Jul 24, 2017, 08:21 PM
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.
lol I agree.
Title: Re: Running System Kilometer/Mileage Request
Post by: ysc3839 on Jul 25, 2017, 03:29 PM
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.
Title: Re: Running System Kilometer/Mileage Request
Post by: Eva on Jul 25, 2017, 03:40 PM
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 :)
Title: Re: Running System Kilometer/Mileage Request
Post by: Shadow on Jul 26, 2017, 06:37 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.

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.
Title: Re: Running System Kilometer/Mileage Request
Post by: vito1 on Jul 26, 2017, 06:44 PM
Quote from: Xmair on Jul 24, 2017, 05:06 PMSquirrel is laggy
No. It's just scripters.
Title: Re: Running System Kilometer/Mileage Request
Post by: SilviUDaciaLogan on Aug 03, 2017, 12:39 PM
Please help me to add mileage system on my server, please!