OnEnterExitModShop

From SA-MP Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 14:28, 20 October 2017
RIDE2DAY (Talk | contribs)

← Previous diff
Current revision
RIDE2DAY (Talk | contribs)
(revert)
Line 13: Line 13:
* It is always called first in filterscripts.}} * It is always called first in filterscripts.}}
-{{note|Players collide when they get into the same mod shop, [https://goo.gl/GnA1j5 vSync] fixes this issue.}}+{{bug|Players collide when they get into the same mod shop.}}
{{Example}} {{Example}}

Current revision



OnEnterExitModShop was added in SA-MP 0.3a This callback was added in SA-MP 0.3a and will not work in earlier versions!


Description:

This callback is called when a player enters or exits a mod shop.


Parameters:
(playerid, enterexit, interiorid)
playeridThe ID of the player that entered or exited the modshop
enterexit1 if the player entered or 0 if they exited
interioridThe 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.


Image:32px-Circle-style-warning.png

Warning

Known Bug: Players collide when they get into the same mod shop.


Example Usage:

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.


Related Functions

The following functions might be useful, as they're related to this callback in one way or another.

Personal tools