OnEnterExitModShop
Description:
Callback OnEnterExitModShopis called when a player enters or exits a mod shop.
Callback OnEnterExitModShop was added in 0.3a and will not work in earlier versions! |
Known Bug(s): Players collide when they get into the same mod shop. |
Parameters:
(playerid, enterexit, interiorid)
int | playerid | The ID of the player that entered or exited the modshop. |
bool | enterexit | 1 if the player entered or 0 if they exited |
int | interiorid | The interior ID of the modshop that the player is entering (or 0 if exiting) |
Return Values:
This callback does not handle returns.
- It is always called first in filterscripts.
Examples:
public OnEnterExitModShop(playerid, enterexit, interiorid) { if(enterexit == 0) // If enterexit is 0, this means they are exiting { SendClientMessage(playerid, COLOR_WHITE, "Nice car! You have been taxed $100."); GivePlayerMoney(playerid, -100); } return 1; }
Related Callbacks
The following callbacks might be useful as well, as they are related to this callback in one way or another.
- OnVehicleMod: Called when a vehicle is modded.
- OnVehicleRespray: Called when a vehicle is resprayed.
- OnVehiclePaintjob: Called when a vehicle's paintjob is changed.
Related Functions
The following functions may be useful, as they are related to this function in one way or another.
- AddVehicleComponent: Add a component to a vehicle.