[FilterScript] [FilterScript] SimpleGoodies v1.0
#1

I decided to make a filterscript full of simple, random stuff.
Until now, theres only one feature in this filterscript:
A vehicle health bar, just above the health bar.

Players can turn on/off the vehicle-health-bar whenever they want.
The filterscript uses 12 textdraws and two timers.
Download AMX
Download source
Reply
#2

Sweet
Reply
#3

Isn't that where the lung capacity bar goes? :/
Reply
#4

Quote:
Originally Posted by BeckzyBoi
Isn't that where the lung capacity bar goes? :/
yea

this looks good.
Reply
#5

Pretty Sure that is where it goes lol but it will probably move the bar down Hopefully if not you found the first bug As right now i can't play the game to test it out
Reply
#6

Looks fairly nice
shame we cant use the Propper SA Bars and stuff (Like when holding | next to shift in samp or TAB in single Player)
Reply
#7

Quote:
Originally Posted by BeckzyBoi
Isn't that where the lung capacity bar goes? :/
Yes, it is. But the vehicle-health-bar is only active while in a vehicle.. unless you wanna drown yourself in a car it wont annoy you...
EDIT: It will just go above the lung-capacity bar, so nothing moves around or nothing.
Reply
#8

That's nice! But why the topic is called SimpleGoodies? Why not a simple "Vehicle Health Bar"
Reply
#9

Cause he does what he wants.. XD
And i haveto vote, that because he is a contributer, he is allowed too do whatever he wants.
Reply
#10

Quote:
Originally Posted by [LSB
X_Cutter ]
That's nice! But why the topic is called SimpleGoodies? Why not a simple "Vehicle Health Bar"
Because im gonna make some other simple goodies in that filterscript, thats why its called what its called.
Reply
#11

Very nice script! i love this kinda funny shit! I dont know if this is a bug, but when u drive in a tourismo, and u hit the wall with full speed (i used nos) the car starts smoking black, and the vehicle health bar = 0.0 like the car is totally wrecked, but it must show like 10% or something, but it says 0% well, it doesnt matter but just wanna say..
Reply
#12

I did only make 10 textdraws for the bar, so its not actualy making the textdraw to match your actual vehicle health. It will display a full bar when the car health is 926 - 1000, and a less full bar if the health is 851 - 925, and so on.. It will show an emty bar when the health is 0 - 300, and the vehicle will start to burn when it has under 250 health. This way, you can see if your car health is very critical.
Reply
#13

Quote:
Originally Posted by Hiphop
Very nice script! i love this kinda funny shit! I dont know if this is a bug, but when u drive in a tourismo, and u hit the wall with full speed (i used nos) the car starts smoking black, and the vehicle health bar = 0.0 like the car is totally wrecked, but it must show like 10% or something, but it says 0% well, it doesnt matter but just wanna say..
lmao that you drove a turismo into a wall full speed while using this.

Nice, original, filterscript Mr-Tape.

Anyone wants the vehicle health bar to show automatically when a player enters a vehicle add this:

Goto line 142:
pawn Code:
if(IsPlayerInAnyVehicle(i) == 1 && playervehiclebar[i] == 1){
Change it to:
pawn Code:
if(IsPlayerInAnyVehicle(i) == 1){
Also a bug, the vehicle health bar isn't unset when a player disconnects so another play can connect and its already set for them.

Fix:
pawn Code:
public OnPlayerDisconnect(playerid) {
  playervehiclebar[playerid]=0;
}
Reply
#14

That will turn it on/off each time someone enters a vehicle...
The bar will hide if the player is not in a vehicle and show if the player is in a vehicle.
Also the playervehiclebar is only for players to have a choice to have the bar on or off.
Reply
#15

Yea I know but some people are gonna want it to show automatically without player choice.
Reply
#16

It already will show automaticly, and that piece of script that you copied from the filterscript will turn it on when the players enter a vehicle, then when he enters the next vehicle it will turn off...
Reply
#17

It does not already show automatically they need to use the command. That makes it so the command is not needed.

Also, I fixed it in my post re-read it.

Oh and clean up your code it compiles with 105 warnings.
Reply
#18

Dude, it shows automaticly if the player is in a vehicle.
Then if the player types /vehiclehealth, it wont show when the player is in a vehicle, if he types /vehiclehealth again, it will show when the player is in a vehicle.

Did you even try the filterscript?

EDIT: Also it will unset it when they disconnect.
Reply
#19

You better take another look at your code.

Maybe that bug I fixed in my earliest post has had you fooled.

It DOES not unset it when they disconnect because you did not call OnPlayerDisconnect. Fix the bug in it before you post again.
Reply
#20

It works fine, also for all players. When a player connects and the players announce is 0, the playervehiclebar will be true, and the bar is turned on for the playerid if the preveous playerid turned it off.

EDIT: Take a look at public ANNOUNCE(){.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)