[FilterScript] Xeon's Speedometer (Analog Speedmeter)
#21

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

damn bro thats very very good work
Reply
#23

Code:
if(speed == 0)

Code:
if(!speed)
-4 char


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

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
Reply
#25

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.
Reply
#26

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.
Reply
#27

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!
Reply
#28

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

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.
Reply
#30

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).
Reply
#31

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!
Reply
#32

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

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])\'
Reply
#34

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

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

Mind++
Reply
#36

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

Very nice!
Reply
#38

Thank you! both of you!
Reply
#39

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)