SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts

Reply
 
Thread Tools Display Modes
Old 18/09/2007, 06:52 AM   #11
Hiphop
Little Clucker
 
Join Date: Jul 2007
Location: Holland
Posts: 45
Reputation: 0
Default Re: [FilterScript] SimpleGoodies v1.0

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..
Hiphop is offline   Reply With Quote
Old 18/09/2007, 07:05 AM   #12
Mr-Tape
Little Clucker
 
Join Date: Jul 2006
Posts: 37
Reputation: 12
Default Re: [FilterScript] SimpleGoodies v1.0

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.
Mr-Tape is offline   Reply With Quote
Old 18/09/2007, 08:23 AM   #13
Proteus
Big Clucker
 
Proteus's Avatar
 
Join Date: Jul 2007
Location: Ontario, Canada
Posts: 172
Reputation: 2
Default Re: [FilterScript] SimpleGoodies v1.0

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;
}
__________________
~ Raekwon

-> Deadly Combinations A/D: http://forum.sa-mp.com/showthread.php?t=89748
Proteus is offline   Reply With Quote
Old 18/09/2007, 08:39 AM   #14
Mr-Tape
Little Clucker
 
Join Date: Jul 2006
Posts: 37
Reputation: 12
Default Re: [FilterScript] SimpleGoodies v1.0

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.
Mr-Tape is offline   Reply With Quote
Old 18/09/2007, 08:41 AM   #15
Proteus
Big Clucker
 
Proteus's Avatar
 
Join Date: Jul 2007
Location: Ontario, Canada
Posts: 172
Reputation: 2
Default Re: [FilterScript] SimpleGoodies v1.0

Yea I know but some people are gonna want it to show automatically without player choice.
__________________
~ Raekwon

-> Deadly Combinations A/D: http://forum.sa-mp.com/showthread.php?t=89748
Proteus is offline   Reply With Quote
Old 18/09/2007, 08:46 AM   #16
Mr-Tape
Little Clucker
 
Join Date: Jul 2006
Posts: 37
Reputation: 12
Default Re: [FilterScript] SimpleGoodies v1.0

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...
Mr-Tape is offline   Reply With Quote
Old 18/09/2007, 08:48 AM   #17
Proteus
Big Clucker
 
Proteus's Avatar
 
Join Date: Jul 2007
Location: Ontario, Canada
Posts: 172
Reputation: 2
Default Re: [FilterScript] SimpleGoodies v1.0

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.
__________________
~ Raekwon

-> Deadly Combinations A/D: http://forum.sa-mp.com/showthread.php?t=89748
Proteus is offline   Reply With Quote
Old 18/09/2007, 08:51 AM   #18
Mr-Tape
Little Clucker
 
Join Date: Jul 2006
Posts: 37
Reputation: 12
Default Re: [FilterScript] SimpleGoodies v1.0

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.
Mr-Tape is offline   Reply With Quote
Old 18/09/2007, 08:57 AM   #19
Proteus
Big Clucker
 
Proteus's Avatar
 
Join Date: Jul 2007
Location: Ontario, Canada
Posts: 172
Reputation: 2
Default Re: [FilterScript] SimpleGoodies v1.0

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.
__________________
~ Raekwon

-> Deadly Combinations A/D: http://forum.sa-mp.com/showthread.php?t=89748
Proteus is offline   Reply With Quote
Old 18/09/2007, 09:00 AM   #20
Mr-Tape
Little Clucker
 
Join Date: Jul 2006
Posts: 37
Reputation: 12
Default Re: [FilterScript] SimpleGoodies v1.0

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(){.
Mr-Tape is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
HELP with a FilterScript KDSTRP Help Archive 4 12/06/2010 06:01 AM
Filterscript Help iPwnz0r Server Support 1 27/01/2010 06:20 PM


All times are GMT. The time now is 12:22 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.