SA-MP Forums Archive
[FilterScript] [FS]AI Speed - 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] [FS]AI Speed (/showthread.php?tid=69790)



[FS]AI Speed - Kinetic - 21.03.2009

AI Speed - Current Version for download V6
What is it:
This is an easy to use speedometer coded by me. It is completely coded by me but I use a similar formula to the godfather code, but there is a large difference. I take three samples of speed and average it to make a speedometer that doesnt jump up and down so much like most others do.

Update Log:
V1: GameModeText/TextDraw Speedometer in MPH
V2: Added Kmph Functionality and a /help command. Changed the way you set textdraw/gamemodetext.
V3: Custom Timer Variable. Ability to disable speedometer when not in car.
V4: Custom colors! Toggle between textdraw and gamemodetext by command. Version for people who want to use default includes instead of my include set.
V5: Added custom textdraw sizes.
V6: Vertical speed detection.

How to use:
Change these values at the top of the script to customize how you want your default speedometer to be.
pawn Code:
//----[Quick Stats]-------------------------------------------------------------
new mphtext = 0; // 0 = textdraw, 1 = gamemodetext.
new style = 0; // The Default Style 0 = mph, 1 = kmph.
new incar   = 0; // Display speedo only in car. 0 = yes, 1 = no.
new timer = 250;// Speed of the speedometer timer in milliseconds.
new spcolor = 0; // Default Color. 0 = blue, 1 = green, 2 = red, 3 = purple, 4 = yellow.
new tdsize = 1; // Default Text Draw Size. 0 = tiny, 1 = normal, 2 = big.
//------------------------------------------------------------------------------

Once the filterscript is loaded, any player can type /speedometer and it will toggle on or off. See /help for a full list of commands.

Screens:
TextDraw
[img width=720 height=576]http://i240.photobucket.com/albums/ff233/jvance1234/ss-68.jpg?t=1237601944[/img]

GameModeText
[img width=720 height=576]http://i240.photobucket.com/albums/ff233/jvance1234/ss-69.jpg?t=1237604598[/img]

Mph/Kmph


Colors


Sizes


Download:
Code:
Archive
V1.0
[full]    (http://www.mediafire.com/?mmyjwhgnqwt)
[amx]   (http://www.mediafire.com/?zymfmmzx2ny)
[pastebin] (http://pastebin.com/f1f14d1c4)

V2.0
[full]    (http://www.mediafire.com/?dzomwyyktiz)
[amx]   (http://www.mediafire.com/?jmhoriycytz)
[pastebin] (http://pastebin.com/f57673fc4)

V3.0
[full]    (http://www.mediafire.com/?tjzelegmcvn)
[amx]   (http://www.mediafire.com/?nnrynymdzoz)
[pastebin] (http://pastebin.com/f127ecc4a)

V4.0
[full]    (http://www.mediafire.com/?zjmyylygmjz)
[amx]   (http://www.mediafire.com/?zfkq4lkzgrx)
[pastebin] (http://pastebin.com/f74c3b1bc)
[Normal Includes Pastebin] (http://pastebin.com/f58351721)

V5.0
[full]    (http://www.mediafire.com/?lt3jqaenmyt)
[amx]   (http://www.mediafire.com/?j5zttn1cuad)
[pastebin] (http://pastebin.com/f1f32f1d9)
[Normal Includes Pastebin] (http://pastebin.com/f55c5b14d)
V6.0
[full] (http://www.mediafire.com/?jzvjnmqkiwd)
[amx] (http://www.mediafire.com/?1ltolkzenzm)
[pastebin] (http://pastebin.com/f6f1ca8c9)
[Normal Includes Pastebin] (http://pastebin.com/f5d8f0b05)


Re: [FS]AI Speed - Norn - 21.03.2009

Why don't you just do

pawn Code:
#define SPEEDO_TD_STYLE 1 //1 = TD, 2 = GAMETEXT



Re: [FS]AI Speed - Kinetic - 21.03.2009

Quote:
Originally Posted by Norn
Why don't you just do

pawn Code:
#define SPEEDO_TD_STYLE 1 //1 = TD, 2 = GAMETEXT
I could, but thats simple how it is and I dont see why I need to fix something that isnt broken.


Re: [FS]AI Speed - Rks25 - 21.03.2009

For the textdraw i would have liked a other position.
But anyways, it is simple yes.


Re: [FS]AI Speed - mascii - 21.03.2009

i like this, although possible in kmph??


Re: [FS]AI Speed - cmg4life - 21.03.2009

ye.

@ Kinetic, did u speak with Orb (Yom) ? He said he started doing this thing and now i see it here O_o

Nice job tho



Re: [FS]AI Speed - Rks25 - 21.03.2009

What is the include lrp you are using?
Can that be removed or is it required?


Re: [FS]AI Speed - mascii - 21.03.2009

If you create a new version can you please include kmph


Re: [FS]AI Speed - Kinetic - 21.03.2009

Quote:
Originally Posted by cmg4life
ye.

@ Kinetic, did u speak with Orb (Yom) ? He said he started doing this thing and now i see it here O_o

Nice job tho
Nope, I was just making a speed system in my game mode and this is the idea I came up with :P.

Quote:
Originally Posted by mascii
i like this, although possible in kmph??
It will come soon

Quote:
Originally Posted by Rks_
What is the include lrp you are using?
Can that be removed or is it required?
It is an include I made that includes all the default samp includes all in one.
Just use all the normal samp includes and it should compile just fine.


Re: [FS]AI Speed - MenaceX^ - 21.03.2009

I didn't see the code, only picutres.
Isn't this same as GF?