SA-MP Forums Archive
[FilterScript] Xeon's Speedometer (Analog Speedmeter) - 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] Xeon's Speedometer (Analog Speedmeter) (/showthread.php?tid=641735)

Pages: 1 2


Re: Xeon\'s Speedometer (Analog Speedmeter) - Meller - 22.09.2017

Quote:
Originally Posted by Paulice
View Post
..
Harsch but true, but yet you were being idiotic with your attitude.


Re: Xeon\'s Speedometer (Analog Speedmeter) - 1fret - 23.09.2017

damn bro thats very very good work


Re: Xeon\'s Speedometer (Analog Speedmeter) - Kaperstone - 23.09.2017

Code:
if(speed == 0)

Code:
if(!speed)
-4 char


EDIT: overall, I really like the style of that speedometro


Re: Xeon\'s Speedometer (Analog Speedmeter) - SyS - 23.09.2017

Quote:
Originally Posted by Paulice
View Post
PHP Code:
for(new 0GetMaxPlayers(); i++) // looping through connected players 
GetPlayerPoolSize exists, use it (note: making it a plug n\' play script for any "SA-MP version" is not a valid excuse to not use the relatively new function)!
Use foreach instead of GetPlayerPoolSize
Quote:
Originally Posted by Paulice
View Post
PHP Code:
new speed;
speed GetPlayerSpeed(playerid); 
Can you not do "new speed = GetPlayerSpeed(playerid);"?
That\'s a point less argument.

Quote:
Originally Posted by Xeon™
View Post


Yes i did heared of it. but in this case its constant. so there no need to wast more ms for a const var.
sizeof is an operator whose value is replaced by a constant (cell value) on compilation itself


Nice script


Re: Xeon\'s Speedometer (Analog Speedmeter) - Paulice - 24.09.2017

Quote:
Originally Posted by SyS
View Post
Use foreach instead of GetPlayerPoolSize
Foreach can go get some ice cream. No, especially on a release. Being optional is fine though.


Re: Xeon\'s Speedometer (Analog Speedmeter) - GhostHacker9 - 24.09.2017

Quote:
Originally Posted by Paulice
View Post
Foreach can go get some ice cream. No, especially on a release.
foreach is faster and only iterates through connected playerids.
Quote:
Originally Posted by Paulice
View Post
Being optional is fine though.
i can\'t believe this is the same guy who posted above shitness lmao.Try to stick to one thing at a time.


Re: Xeon\'s Speedometer (Analog Speedmeter) - Xeon™ - 24.09.2017

Thank you all for feedback!

Update 2.3:

Features:


- Distance counter has been re-made from scratch.


- Added a new config for optimizations SERVER_VEHICLES.


- Now supporting foreach standalone version.

Bug Fixes & Optimizations:


- Replaced GetPlayerPoolSize with Foreach Thanks to Sys!


- Doing a little optimizations Thanks to Kaperstone & Sys!


- Fixed a bug that #else if generate.


You can find the progress out here!


Re: Xeon\'s Speedometer (Analog Speedmeter) - Crystallize - 24.09.2017

Didn’t know “Kar” created foreach thanks for the new info dude.


Re: Xeon\'s Speedometer (Analog Speedmeter) - Xeon™ - 24.09.2017

Quote:
Originally Posted by Crystallize
View Post
Didn’t know “Kar” created foreach thanks for the new info dude.
originaly by Y_Less, but Kar did fixed and did created standalone version of it and many things.


Re: Xeon\'s Speedometer (Analog Speedmeter) - VVWVV - 24.09.2017

Good job.


1) Why do you check the player\'s connection in the foreach loop? For example:
pawn Code:
foreach (new i : Player)
    {
        if(IsPlayerConnected(i))  // Why??
        {


2) You should add and use constants to make your code more readable (it is a good practice for all programmers).


Re: Xeon\'s Speedometer (Analog Speedmeter) - Xeon™ - 24.09.2017

Quote:
Originally Posted by VVWVV
View Post
Good job.


1) Why do you check the player\'s connection in the foreach loop? For example:
pawn Code:
foreach (new i : Player)
    {
        if(IsPlayerConnected(i))  // Why??
        {


2) You should add and use constants to make your code more readable (it is a good practice for all programmers).
aw! my fault forget to remove the IPC its done!


2) i ain\'t?


Thanks for feedback!


Re: Xeon\'s Speedometer (Analog Speedmeter) - VVWVV - 24.09.2017

Quote:
Originally Posted by Xeon™
View Post
2) i ain\'t?
I\'ve found the magic number in the loop here.


Re: Xeon\'s Speedometer (Analog Speedmeter) - Xeon™ - 24.09.2017

Quote:
Originally Posted by VVWVV
View Post
I\'ve found the magic number in the loop here.
don\'t know but it give errors while compling \'sizeof(p_Speedo[playerid])\'


Re: Xeon's Speedometer (Analog Speedmeter) - VVWVV - 24.09.2017

Quote:
Originally Posted by Xeon™
View Post
don't know but it give errors while compling 'sizeof(p_Speedo[playerid])'
Code:
sizeof(p_Speedo[])



Re: Xeon's Speedometer (Analog Speedmeter) - Xeon™ - 24.09.2017

Quote:
Originally Posted by VVWVV
View Post
Code:
sizeof(p_Speedo[])
Thanks! updated!

Mind++


Re: Xeon\'s Speedometer (Analog Speedmeter) - TakeiT - 24.09.2017

Nice! Reminds me of an old GM speedometer. Would definitely use it on certain car models if I had a server!


Re: Xeon\'s Speedometer (Analog Speedmeter) - RxErT - 24.09.2017

Very nice!


Re: Xeon\'s Speedometer (Analog Speedmeter) - Xeon™ - 25.09.2017

Thank you! both of you!


Re: Xeon\'s Speedometer (Analog Speedmeter) - Xeon™ - 10.10.2017

Major Update 3.0:


This update was developed by BigETI


- Minor changes to foreach.


- Rewriting the full script. (was done by BigETI)


I suggest to you\'all update to this version, (stable)


Thank you! you can find more information here.


Big Thanks to BigETI for this major update.