OnVehicleRespray
From SA-MP Wiki
(Difference between revisions)
Revision as of 18:39, 16 January 2014 Costel nistor96 (Talk | contribs) ← Previous diff |
Revision as of 04:04, 5 February 2014 Connor Mead (Talk | contribs) Next diff → |
||
Line 1: | Line 1: | ||
{{Scripting}} | {{Scripting}} | ||
- | {{Title}} | ||
{{Description|The callback name is deceptive, this callback is called when a player exits a mod shop, regardless of whether the vehicle's colors were changed, and is NEVER called for pay 'n' spray garages.}} | {{Description|The callback name is deceptive, this callback is called when a player exits a mod shop, regardless of whether the vehicle's colors were changed, and is NEVER called for pay 'n' spray garages.}} | ||
Line 35: | Line 34: | ||
[[Category:Scripting Callbacks]] | [[Category:Scripting Callbacks]] | ||
+ | |||
+ | [[fr:OnVehicleRespray]] |
Revision as of 04:04, 5 February 2014
Description:
The callback name is deceptive, this callback is called when a player exits a mod shop, regardless of whether the vehicle's colors were changed, and is NEVER called for pay 'n' spray garages.
(playerid, vehicleid, color1, color2)
playerid | The ID of the player that is driving the vehicle. |
vehicleid | The ID of the vehicle that was resprayed. |
color1 | The color that the vehicle's primary color was changed to. |
color2 | The color that the vehicle's secondary color was changed to. |
Return Values:
This callback does not handle returns.
Note | Misleadingly, this callback is not called for pay 'n' spray (only modshops).
Fix here: http://pastebin.com/zX96D4dA |
public OnVehicleRespray(playerid, vehicleid, color1, color2) { new string[48]; format(string, sizeof(string), "You resprayed vehicle %d to colors %d and %d!", vehicleid, color1, color2); SendClientMessage(playerid, COLOR_GREEN, string); return 1; }
Related Functions
The following functions might be useful, as they're related to this callback in one way or another.
- ChangeVehicleColor: Set the color of a vehicle.
- ChangeVehiclePaintjob: Change the paintjob on a vehicle.
Related Callbacks
The following callbacks might be useful as well, as they are related to this callback in one way or another.
- OnVehiclePaintjob: Called when a vehicle's paintjob is changed.
- OnVehicleMod: Called when a vehicle is modded.
- OnEnterExitModShop: Called when a vehicle enters or exits a mod shop.