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

Xeon Speedmeter


Introduction:


Hello,


This is another speedo filterscript, just like others but this one uses analogic speed counter instead of numeric one.

this fs has been done using 18 Global textdraws and 4 Player textdraws and it was optimized so much, testing/recording was done by Abyss Morgan (Big Thanks!) and let\'s not forget BigETI for his major update to this project!, hope you have fun by doing it. for future versions of this speedmeter I\'m gonna add fuel support and nitros. you can find source code here.

Screenshots:

Click Here!
Click Here!


(The pictures resolutions is too big, sorry about that)

Video:

https://*********/_I5l2s974xM

How to install?:


- Download xspeedo.pwn and foreach.inc

- C&P foreach in the include folder at your pawn directory

- Edit "Xeon Test Server" & MAX_SLOTS onto anything you want.

- Press F5 (Compile the script)

- Copy output file name (xspeedo.amx) to filterscripts folder on your server root directory.

- Add it on server.cfg

- Restart your server and you are done!

Download:

Click on me!

Credits:


*SA:MP Team (a_samp)

*foreach (Kar)

*Abyss Morgan (Testing, Recording, Supporting, Hosting)

*BigETI (Major Update 3.0)

*Kar (Reserve detection)

*Michael (GetPlayerSpeed)
Reply
#2

Good Job!
Thanks for sharing. You totally deserve +rep
Reply
#3

Quote:
Originally Posted by SonnyGamer
View Post
Good Job!

Thanks for sharing. You totally deserve +rep
Thank you for your feedback! hope you like it.
Reply
#4

Looks great for only 17 textdraws, well done.
Reply
#5

Quote:
Originally Posted by Meller
View Post
Looks great for only 17 textdraws, well done.
Thanks!
Reply
#6

welcome back to the 1950s
Reply
#7

That\'s ma\' boy !

Good job nigga +Rep
Reply
#8

Thank you! both of you!
Reply
#9

Nice work bro i like the textdraws.
Reply
#10

Thank you!
Reply
#11

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)!

PHP Code:
for(new 04i++) // new PlayerText:p_Speedo[MAX_PLAYERS][4];
for(new 018i++) // new Text:g_Speedo[18]; 
Have you never heard of "sizeof"?

PHP Code:
new speed;
speed GetPlayerSpeed(playerid); 
Can you not do "new speed = GetPlayerSpeed(playerid);"?

PHP Code:
if(speed == 0)
{

}
else
{
    if(
speed 0Gear[playerid] = "D";

The second if-then is useless. Speed will obviously always be over 0 (note: there\'s no negative speed)!


-_-

PHP Code:
if(speed 0Gear[playerid] = "D";
if(
IsVehicleDrivingBackwards(GetPlayerVehicleID(playerid))) Gear[playerid] = "R"
Have you never heard of "else if"? Guess not.

PHP Code:
if(speed 200speed 205
Your system supports up to 200. By setting it to 205 when it\'s over 200 tells us either the representation is inaccurate or you know what.


-----

https://cdn.discordapp.com/attachmen.../sa-mp-087.png


- Speed will never go over 999, the extra zero (0) in "0099 KM/H" is useless.

- "Test Server Name" is not centered.

- The alignment of the bar is terrible and inaccurate.

- I have no idea why "Gear:" is in a different font than the speed.

- The number in the middle is just horrendous.


Overall, 2 stars. And I don\'t see why you feel the need to reply "thanks" or "thank you" to every positive post.
Reply
#12

Can I Change Position Of Speedmeter To center of the screen
Reply
#13

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)!
EDIT: Good Point, i was doing it wrrong

Quote:
Originally Posted by Paulice
View Post
PHP Code:
for(new 04i++) // new PlayerText:p_Speedo[MAX_PLAYERS][4];
for(new 018i++) // new Text:g_Speedo[18]; 
Have you never heard of "sizeof"?
Yes i did heared of it. but in this case its constant. so there no need to wast more ms for a const var.

Quote:
Originally Posted by Paulice
View Post
PHP Code:
new speed;

speed GetPlayerSpeed(playerid); 
Can you not do "new speed = GetPlayerSpeed(playerid);"?
This is under scripter style. its doesn\'t matter in this point. but declaring variable before setting the var is better.

Quote:
Originally Posted by Paulice
View Post
PHP Code:
if(speed == 0)
{

}
else
{
    if(
speed 0Gear[playerid] = "D";

The second if-then is useless. Speed will obviously always be over 0 (note: there\'s no negative speed)!


-_-
if you did notice. i did used "else" without specifing what it should it check. 1 line for checking doesn\'t matter. also its gonna be checked anyway if you do or not, Gear "D" need to be attached.

Quote:
Originally Posted by Paulice
View Post
PHP Code:
if(speed 0Gear[playerid] = "D";
if(
IsVehicleDrivingBackwards(GetPlayerVehicleID(playerid))) Gear[playerid] = "R"


Have you never heard of "else if"? Guess not.
i did heared of it too! but the speed is always positive, so if i used "else" the script won\'t count the reserve gear.

Quote:
Originally Posted by Paulice
View Post
PHP Code:
if(speed 200speed 205
Your system supports up to 200. By setting it to 205 when it\'s over 200 tells us either the representation is inaccurate or you know what.
after i did counted x and y, i did found after 195 the arrow miss 2.0 of x. so i did added 5 to make it right on 200! also the max of speed is 210

Quote:
Originally Posted by Paulice
View Post
https://cdn.discordapp.com/attachmen.../sa-mp-087.png


- Speed will never go over 999, the extra zero (0) in "0099 KM/H" is useless.

- "Test Server Name" is not centered.

- The alignment of the bar is terrible and inaccurate.

- I have no idea why "Gear:" is in a different font than the speed.

- The number in the middle is just horrendous.
- Helicopters goes more than 999km/h

- Finally you did find something useful. i will edit on next update!

- that your opinion, thanks

- Because its Gear. on real cars Gear haven\'ts same font as speed counter.

- Nice to know.

Quote:
Originally Posted by Paulice
View Post
Overall, 2 stars. And I don\'t see why you feel the need to reply "thanks" or "thank you" to every positive post.
Thanks for feedback.


Note: god fathers alraedy checked the script before it goes released. i did worked hard to make opitimzed and clean. their opinion was +4 reps from everyone. and they confirmed to me that\'s a clean script.


Can\'t you stop being like that SickAttack?

Quote:
Originally Posted by Mr.Vince™
View Post
Can I Change Position Of Speedmeter To center of the screen
Yes you can you need only to minus the x values from the real positions


401.etc - 10.0 per textdraw
Reply
#14

Simple tutorial: How to use GetPlayerPoolSize
PHP Code:
for(new 0GetPlayerPoolSize(); <= ji++){
    if(
IsPlayerConnected(i)){
    
    }

Reply
#15

Quote:
Originally Posted by Paulice
View Post
[..]
5 stars to the thread because you don\'t like it.

Quote:
Originally Posted by AbyssMorgan
View Post
Simple tutorial: How to use GetPlayerPoolSize
PHP Code:
for(new 0GetPlayerPoolSize(); <= ji++){
    if(
IsPlayerConnected(i)){
    
    }

PHP Code:
for( new GetPlayerPoolSize( ); > -1i-- ) 
Reply
#16

Quote:
Originally Posted by Jayse
View Post
PHP Code:
for( new GetPlayerPoolSize( ); > -1i-- ) 
Useless "optimization".

Quote:
Originally Posted by Jayse
View Post
5 stars to the thread because you don\'t like it.
"GetPlayerPoolSize not always working (its kind bugged)"


I may consider doing what you told me earlier XD
Reply
#17

Update 2.0:

Features:


- Adding Timers Supports.


Now you can use timers instand of OnPlayerUpdate

HOW? you need only to define USE_TIMERS & UPDATE_DELAY!

Bug Fixes & Optimizations:


- Replaced GetMaxPlayers() with GetPlayerPoolSize thanks to Abyss (again)!


- Changed SERVER_NAME Position to be quite centred!


You can find the progress out here!
Reply
#18

Quote:
Originally Posted by Xeon™
View Post
Bug Fixes & Optimizations:


- Replaced GetMaxPlayers() with GetPlayerPoolSize thanks to Abyss (again)!
Brah, wiki tells you how: https://sampwiki.blast.hk/wiki/GetPlayerPoolSize
Reply
#19

Quote:
Originally Posted by Paulice
View Post
didn\'t know about it! too bad.
Reply
#20

That\'s a nice job, Xeon!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)