Re: Xeon\'s Speedometer (Analog Speedmeter) -
Meller - 22.09.2017
Quote:
Originally Posted by Paulice
..
|
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
-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
PHP Code:
for(new i = 0; i < GetMaxPlayers(); 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
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™
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
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
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
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
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
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™
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
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™
don't know but it give errors while compling 'sizeof(p_Speedo[playerid])'
|
Re: Xeon's Speedometer (Analog Speedmeter) -
Xeon™ - 24.09.2017
Quote:
Originally Posted by VVWVV
|
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.