SA-MP Forums Archive
[FilterScript] Very simple speedometer - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] Very simple speedometer (/showthread.php?tid=542959)



Very simple speedometer - LeXuZ - 23.10.2014

Hey guys, this is my little speedometer, it didn't take long to make, but i thought it would be useful for other scripters to use if you wanted,
Screenshot: (Sorry about the fuel being next to it, that was just a tester filterscript)
If you like it you can find it in my pastebin
Pastebin link: http://pastebin.com/0A2zNdxR
Hope you like it, and give me your feedback in comments, on how i can improve and what you like about it
thank you


Re: Very simple speedometer - TheRohlikar - 23.10.2014

Oh.. Getting speed in "OnPlayerUpdate" ? Wow. I think that timer is better, but... Good job !


Re: Very simple speedometer - nGen.SoNNy - 23.10.2014

Nice but "OnPlayerUpdate" ...


Re: Very simple speedometer - Crayder - 23.10.2014

Using OnPlayerUpdate for this is not very smart, and if you made this script for us you would've removed the fuel line, which is fairly simple, I have a feeling this is not your script, but it's just a hunch (mainly because your post count is 4, you made this account just to post this.)...

If it is truly yours, good job, remove the fuel line, add option for mph...


Re: Very simple speedometer - M0HAMMAD - 23.10.2014

Don't use OnPlayerUpdate
SetTimer on OnGameModeInit is Better.
anyway, it's Good


Respuesta: Very simple speedometer - !R1Ch@rD! - 23.10.2014

very good bro


Re: Very simple speedometer - LeXuZ - 23.10.2014

Quote:

Using OnPlayerUpdate for this is not very smart, and if you made this script for us you would've removed the fuel line, which is fairly simple, I have a feeling this is not your script, but it's just a hunch (mainly because your post count is 4, you made this account just to post this.)...

If it is truly yours, good job, remove the fuel line, add option for mph...

the fuel system is not in the pastebin, it's only on the screenshot, if you even checked, and just because my account is new doesn't mean that i can not script, this is one of my new scripts, i am not good with PAWN. This filterscript is mine, I've been working on this stuff with my brother (who knows how to script), and he helped me with the textdraw, Anyway thanks for your feedback, i will update it soon


Re: Very simple speedometer - SpiritZ - 23.10.2014

NICE


Re: Very simple speedometer - LeXuZ - 23.10.2014

Thanks, hope you enjoy it


Re: Very simple speedometer - Pottus - 23.10.2014

Well I will tell you whats wrong with this.

1.) Use player textdraws currently this script would eventually fill all textdraw slots
2.) Incorrect velocity calculation 180.0 is the correct value
pawn Код:
floatround(floatsqroot(floatabs(floatpower(Pos[0] + Pos[1] + Pos[2], 2))) * 180.0);
3.) I don't see much issue with using OnPlayerUpdate() it will make for a very smooth speedo yeah you could use a timer instead for a bit more optimization.
4.) No clean up code for unloading FS
5.) No start up code for loading FS