Vice City: Multiplayer

Server Development => Scripting and Server Management => Snippet Showroom => Topic started by: soulshaker on Apr 09, 2015, 09:33 AM

Title: Real Speedometer!!
Post by: soulshaker on Apr 09, 2015, 09:33 AM
Made this couple of months ago, so though posting here
http://pastebin.com/MX8UsNghEnjoy!
Title: Re: Real Speedometer!!
Post by: Sebastian on Apr 09, 2015, 01:21 PM
You could come with more info about it...
( + some pics )
Title: Re: Real Speedometer!!
Post by: Finch on Apr 09, 2015, 01:57 PM
Well i say Nice Work but i didnt test it but when i test it its not showing SpeedoMeter
Why?????
Title: Re: Real Speedometer!!
Post by: Honey on Apr 09, 2015, 02:36 PM
Nice work
Title: Re: Real Speedometer!!
Post by: Thijn on Apr 09, 2015, 03:48 PM
So, where's the credits?
Title: Re: Real Speedometer!!
Post by: soulshaker on Apr 09, 2015, 03:54 PM
Quote from: Finch on Apr 09, 2015, 01:57 PMWell i say Nice Work but i didnt test it but when i test it its not showing SpeedoMeter
Why?????

Post error logs!!

Quote from: Thijn on Apr 09, 2015, 03:48 PMSo, where's the credits?
Everything on that link^
Title: Re: Real Speedometer!!
Post by: Finch on Apr 09, 2015, 04:22 PM
There is no error logs when i sit on car nothing show on console and nothing happen on game
Title: Re: Real Speedometer!!
Post by: EK.IceFlake on Apr 09, 2015, 06:32 PM
Quote from: Finch on Apr 09, 2015, 04:22 PMThere is no error logs when i sit on car nothing show on console and nothing happen on game
Thats what happens when people like you try to install a script.
Title: Re: Real Speedometer!!
Post by: Thijn on Apr 09, 2015, 06:44 PM
Quote from: soulshaker on Apr 09, 2015, 03:54 PM
Quote from: Thijn on Apr 09, 2015, 03:48 PMSo, where's the credits?
Everything on that link^
There's no credits on that pastebin. You didn't create the images.

Also, did you test this with multiple people in the same server? Nope, thought so.
You start a timer when someone joins a vehicle, with a ridiculous timeout of 10ms. But when someone else exits his vehicle, that same timer will get removed.

This basically means the script is bugged for more then 1 player, and will lag the shit out of your server. Don't use :)
Title: Re: Real Speedometer!!
Post by: Finch on Apr 10, 2015, 02:06 AM
As What I say
Title: Re: Real Speedometer!!
Post by: EK.IceFlake on Apr 10, 2015, 06:06 AM
Quote from: Thijn on Apr 09, 2015, 06:44 PMThis basically means the script is bugged for more than* 1 player. Don't use :)
If you (soulshaker) wanna know why it is so freaking bugged, thats because you assign a same variable name overwriting the old one. This will work with multiple timers but they will interfere each other and freaking lag da shit outta your server. Make a timer appear on onScriptLoad and nowhere else if it has a player loop.
Title: Re: Real Speedometer!!
Post by: DizzasTeR on Apr 10, 2015, 07:57 AM
Why make custom shit speedometers? If the game itself doesnt have one then just leave it alone.

Creating such stuff will just use more memory and lag a server and most of all a timer having 20ms rofl it is also updating the sprite every 20ms with other calculations....

Sorry but this is more like a lag-o-meter.
Title: Re: Real Speedometer!!
Post by: soulshaker on Apr 10, 2015, 07:59 AM
Quote from: Thijn on Apr 09, 2015, 06:44 PM
Quote from: soulshaker on Apr 09, 2015, 03:54 PM
Quote from: Thijn on Apr 09, 2015, 03:48 PMSo, where's the credits?
Everything on that link^
There's no credits on that pastebin. You didn't create the images.

Credits:- ThunderStorm(who provided me these images)
Quote from: Thijn on Apr 09, 2015, 06:44 PMThis basically means the script is bugged for more then 1 player, and will lag the shit out of your server. Don't use :)
Code Updated regarding that!
Title: Re: Real Speedometer!!
Post by: EK.IceFlake on Apr 10, 2015, 09:00 AM
Quote from: soulshaker on Apr 10, 2015, 07:59 AM
Quote from: Thijn on Apr 09, 2015, 06:44 PMThis basically means the script is bugged for more then 1 player, and will lag the shit out of your server. Don't use :)
Code Updated regarding that!
Its still using a freaking 10ms timer...
Title: Re: Real Speedometer!!
Post by: soulshaker on Apr 10, 2015, 01:20 PM
I have update it to 1000ms
Title: Re: Real Speedometer!!
Post by: ysc3839 on Apr 11, 2015, 05:37 AM
It's not necessary use "sqrt" to calculate speed. Just use "vehicle.Speed.Length()"

My code pin.RotateForPlayer(plr, -floor(veh.Speed.Length() * 180) * PI / 180 );
Title: Re: Real Speedometer!!
Post by: soulshaker on Apr 11, 2015, 07:33 AM
Quote from: ysc3839 on Apr 11, 2015, 05:37 AMIt's not necessary use "sqrt" to calculate speed. Just use "vehicle.Speed.Length()"

Thanks Ysc :)
Code Updated!
Title: Re: Real Speedometer!!
Post by: Gudio on Apr 11, 2015, 09:01 AM
-(vehicle.Speed.Length() * 3.985 )shows pretty similar speed to single player

check vehicles max speed (http://thijn.vrocker-hosting.co.uk/VCWiki/index.php/VehicleIDs)
Title: Re: Real Speedometer!!
Post by: Sebastian on Apr 14, 2015, 06:32 PM
Quote from: Gudio on Apr 11, 2015, 09:01 AMcheck vehicles max speed (http://thijn.vrocker-hosting.co.uk/VCWiki/index.php/VehicleIDs)

*cough* 0.4 wiki (http://wiki.vc-mp.org/wiki/Vehicles) *cough*
Title: Re: Real Speedometer!!
Post by: imran on Jun 24, 2015, 08:58 PM
What's this ??? :/
link (http://s29.postimg.org/yo09tlqfr/Capture.png)
Title: Re: Real Speedometer!!
Post by: Thijn on Jun 25, 2015, 05:36 AM
That's an error which states the function you tell the timer to call does not exist.
You probably added the function to your script wrong.
Title: Re: Real Speedometer!!
Post by: imran on Jun 25, 2015, 10:09 AM
no i only did copy paste
Title: Re: Real Speedometer!!
Post by: EK.IceFlake on Jun 25, 2015, 02:55 PM
Quote from: sseebbyy on Apr 14, 2015, 06:32 PM
Quote from: Gudio on Apr 11, 2015, 09:01 AMcheck vehicles max speed (http://thijn.vrocker-hosting.co.uk/VCWiki/index.php/VehicleIDs)

*cough* 0.4 wiki (http://wiki.vc-mp.org/wiki/Vehicles) *cough*
Will you please stop coughing?
Title: Re: Real Speedometer!!
Post by: Sebastian on Jun 25, 2015, 04:14 PM
Quote from: NE.CrystalBlue on Jun 25, 2015, 02:55 PMWill you please stop coughing?

Someone is upset.
Title: Re: Real Speedometer!!
Post by: SilviUDaciaLogan on Jul 23, 2017, 11:37 AM
I have a problem with CreateSprite. Help me, please!
Title: Re: Real Speedometer!!
Post by: Decent_946 on Jul 23, 2017, 03:54 PM
Quote from: SilviUDaciaLogan on Jul 23, 2017, 11:37 AMI have a problem with CreateSprite. Help me, please!
CreateSprite function has been replaced by GUI Sprite system.

Use Doom Killers Speed-o-Meter instead.
Here: http://forum.vc-mp.org/?topic=4353
Title: Re: Real Speedometer!!
Post by: Mohamed Boubekri on Dec 25, 2017, 10:32 PM
Quote from: Honey on Apr 09, 2015, 02:36 PMNice work
Title: Re: Real Speedometer!!
Post by: KrOoB_ on Jun 19, 2018, 08:18 AM
LINKS ARE BROKEN PLEAS UPLOAD AGAIN
Title: Re: Real Speedometer!!
Post by: KingDark on Dec 29, 2019, 09:15 PM
the links of the 2 images do not work