SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 19/07/2012, 08:55 AM   #1
MP2
Godfather
 
MP2's Avatar
 
Join Date: Jan 2011
Location: England
Posts: 6,325
Reputation: 902
Default OnVehicleRespray for pay 'n' spray

Makes OnVehicleRespray be called when a player uses pay 'n' spray.

DOWNLOAD
http://pastebin.com/zX96D4dA

Works by setting vehicles' health to 999 when created and detecting an increase to 1000.

Simples.

NOTE: 'color1' and 'color2' values will always be -1 in OnVehicleRespray.
__________________
>> Click here to see my releases.

Please do not PM me requesting help. Here you have a forum with 11,000+ active users - why are you limiting your help to one person?
MP2 is offline   Reply With Quote
Old 19/07/2012, 09:41 AM   #2
FireCat
Banned
 
Join Date: Jul 2010
Posts: 2,471
Reputation: 596
Default Re: OnVehicleRespray for pay 'n' spray

Good, I guess?
FireCat is offline   Reply With Quote
Old 19/07/2012, 09:58 AM   #3
Vince
Godfather
 
Vince's Avatar
 
Join Date: Sep 2007
Location: Belgium
Posts: 6,682
Reputation: 1751
Default Re: OnVehicleRespray for pay 'n' spray

Requires Y_Hooks .. Not very user friendly for those who decide not to use that.
__________________

I am not your "bro", not your "nigga" and not your friend.
Vince is online now   Reply With Quote
Old 19/07/2012, 10:07 AM   #4
Glint
Guest
 
Posts: n/a
Default Re: OnVehicleRespray for pay 'n' spray

Quote:
Works by setting vehicles' health to 999 when created and detecting an increase to 1000
i didn't get that part ?

does that mean it is going to work if an admin used "/fix [playerid]" to fix the specified player's vehicle ?
  Reply With Quote
Old 19/07/2012, 10:22 AM   #5
KyleSmith
High-roller
 
Join Date: Mar 2009
Location: United Kingdom
Posts: 2,171
Reputation: 242
Default Re: OnVehicleRespray for pay 'n' spray

You should make it call for when it's resprayed in transfender etc.
KyleSmith is offline   Reply With Quote
Old 19/07/2012, 11:41 AM   #6
Hanger
Huge Clucker
 
Join Date: Apr 2012
Location: UK
Posts: 205
Reputation: 32
Default Re: OnVehicleRespray for pay 'n' spray

Have you heard about vehicle health hack? Hackers may spam health hack therefore server will be lagged.
__________________
FS
Include
Other
-- None --
-- None --
Hanger is offline   Reply With Quote
Old 19/07/2012, 11:48 AM   #7
MP2
Godfather
 
MP2's Avatar
 
Join Date: Jan 2011
Location: England
Posts: 6,325
Reputation: 902
Default Re: OnVehicleRespray for pay 'n' spray

Quote:
Originally Posted by FireCat View Post
Good, I guess?
You guess correct.

Quote:
Originally Posted by Vince View Post
Requires Y_Hooks .. Not very user friendly for those who decide not to use that.
I agree, I may change it.

Quote:
Originally Posted by Lexi' View Post
i didn't get that part ?

does that mean it is going to work if an admin used "/fix [playerid]" to fix the specified player's vehicle ?
If you set a vehicle's health to 1000 it will just set it back to 999. It only calls it if you are in range of a pay 'n' spray for this very reason.

Quote:
Originally Posted by KyleSmith View Post
You should make it call for when it's resprayed in transfender etc.
It already is natively - this makes it work for pay 'n' spray also.

Quote:
Originally Posted by Hanger View Post
Have you heard about vehicle health hack? Hackers may spam health hack therefore server will be lagged.
Then ban them. This actually makes it a lot easier to detect that hack.
__________________
>> Click here to see my releases.

Please do not PM me requesting help. Here you have a forum with 11,000+ active users - why are you limiting your help to one person?
MP2 is offline   Reply With Quote
Old 19/07/2012, 04:23 PM   #8
Niko_boy
High-roller
 
Niko_boy's Avatar
 
Join Date: Aug 2010
Location: Somewhere i belong
Posts: 1,422
Reputation: 137
Default Re: OnVehicleRespray for pay 'n' spray

preety much usefull all around SAMP =)
__________________
$$$ If anyone want to get any of these:
  • DM/TDM/Freeroam/Stunt server, filterscripts or Bug fixing.or some general mapping. Above all any of the logos and banners or signature sorta stuff aswell.at some cheap and worth-full prices.
can Contact me for more info or a deal.
•••[0.3x]LCS•Freeroam•DM•Stunts•Race•Parkour•••AutoArena [0.3z][No SkinShot][sixtytiger.com]Want a decent Attack Defend Gamemode?
176.31.120.76:7777176.31.229.148:7830Get This! Attack-Defend(v2.3.1)
Niko_boy is offline   Reply With Quote
Old 20/07/2012, 05:10 AM   #9
CaptainMactavish
Huge Clucker
 
CaptainMactavish's Avatar
 
Join Date: Jun 2012
Location: Argentina
Posts: 368
Reputation: 18
Default Respuesta: OnVehicleRespray for pay 'n' spray

So you used this in OnPlayerUpdate being conscious that this callback is called around 30 times per second and per player?
__________________


Quote:
Originally Posted by dugi in Slice's Visitor Messages LOL
Donde, está, la biblioteca. Me llamo T-Bone La araña discoteca. Discoteca, muñeca, La biblioteca Está en bigotes grandes, el perro, manteca. Manteca, bigotes, gigante, pequeño, la cabeza es nieve, cerveza es bueno. Buenos dias, me gusta papas frías, los bigotes de la cabra Es Cameron Diaz.
CaptainMactavish is offline   Reply With Quote
Old 20/07/2012, 11:52 AM   #10
MP2
Godfather
 
MP2's Avatar
 
Join Date: Jan 2011
Location: England
Posts: 6,325
Reputation: 902
Default Re: Respuesta: OnVehicleRespray for pay 'n' spray

Quote:
Originally Posted by CaptainMactavish View Post
So you used this in OnPlayerUpdate being conscious that this callback is called around 30 times per second and per player?
All it does is check vehicle health - it's not 'damaging'. It's probably more efficient than a timer and loop.

People have it drilled in to their heads that using OnPlayerUpdate is BAD. It's not. Having a loop through 2000 vehicles in there is bad yes, but a single statement is not. It was added to be used, not to just sit there un-used. People complain when they use memory, and when they use CPU, but they're there to be used. I'm not saying efficiency is bad, I just think people go over the top.
__________________
>> Click here to see my releases.

Please do not PM me requesting help. Here you have a forum with 11,000+ active users - why are you limiting your help to one person?
MP2 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
OnVehicleRespray. budelis Scripting Help 14 22/07/2012 01:26 PM
OnVehicleRespray Master_FM Help Archive 3 08/05/2011 10:45 AM
[Bug?]OnVehicleRespray T-N-Z Help Archive 2 07/12/2010 06:11 PM
OnVehicleRespray. GaGlets(R) Help Archive 4 13/11/2010 02:47 AM


All times are GMT. The time now is 07:54 PM.


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