|
|
#1 |
|
Godfather
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jan 2011
Location: England
Posts: 5,273
Reputation: 748
|
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. |
|
|
|
|
|
#2 |
|
Banned
![]() Join Date: Jul 2010
Posts: 2,365
Reputation: 569
|
Good, I guess?
|
|
|
|
|
|
#3 |
|
High-roller
![]() ![]() ![]() ![]() ![]() Join Date: Sep 2007
Location: Belgium
Posts: 4,917
Reputation: 1425
|
Requires Y_Hooks .. Not very user friendly for those who decide not to use that.
|
|
|
|
|
|
#4 | |
|
Guest
Posts: n/a
|
Quote:
does that mean it is going to work if an admin used "/fix [playerid]" to fix the specified player's vehicle ? |
|
|
|
|
#5 |
|
High-roller
![]() ![]() ![]() ![]() ![]() Join Date: Mar 2009
Location: United Kingdom
Posts: 1,515
Reputation: 130
|
You should make it call for when it's resprayed in transfender etc.
|
|
|
|
|
|
#6 |
|
Big Clucker
![]() ![]() Join Date: Apr 2012
Location: UK
Posts: 144
Reputation: 23
|
Have you heard about vehicle health hack? Hackers may spam health hack therefore server will be lagged.
|
|
|
|
|
|
#7 | |||
|
Godfather
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jan 2011
Location: England
Posts: 5,273
Reputation: 748
|
You guess correct.
Quote:
Quote:
Quote:
Then ban them. This actually makes it a lot easier to detect that hack. |
|||
|
|
|
|
|
#8 |
|
High-roller
![]() ![]() ![]() ![]() ![]() Join Date: Aug 2010
Location: INDIA !!! :)) Punjab
Posts: 1,080
Reputation: 107
|
preety much usefull all around SAMP =)
|
|
|
|
|
|
#9 |
|
Huge Clucker
![]() ![]() ![]() Join Date: Jun 2012
Location: Argentina
Posts: 369
Reputation: 18
|
So you used this in OnPlayerUpdate being conscious that this callback is called around 30 times per second and per player?
|
|
|
|
|
|
#10 | |
|
Godfather
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jan 2011
Location: England
Posts: 5,273
Reputation: 748
|
Quote:
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. |
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
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 05:11 PM |
| OnVehicleRespray. | GaGlets(R) | Help Archive | 4 | 13/11/2010 01:47 AM |