OnPlayerMoneyChange: Difference between revisions
Jump to navigation
Jump to search
(Created page with "__NOTOC__ {{Server event}} This event identifies changes to the player's money if it is changed on the server-side. '''NOTE:''' This event explanation was created by zJoaoFtw_ ==Parameters== <syntaxhighlight lang="lua"> int oldValue, int newValue </syntaxhighlight> *'''oldValue''': the int amount of money before being changed. *'''newValue''': the int amount of money after being changed. ==Source== The source of this event is t...") |
(Marked for deletion) |
||
(2 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
{{Delete|This event doesn't exist as a built-in in MTA event. It exists only in the default "admin" resource}} | |||
__NOTOC__ | __NOTOC__ | ||
{{Server event}} | {{Server event}} | ||
This event identifies changes to the player's money if it is changed on the server-side. | This event identifies changes to the player's money if it is changed on the server-side. | ||
==Parameters== | ==Parameters== | ||
Line 14: | Line 13: | ||
==Source== | ==Source== | ||
The [[event system#Event source|source]] of this event is the [[ | The [[event system#Event source|source]] of this event is the [[player]] with which the element had its money changed. | ||
==Example== | ==Example== |
Latest revision as of 14:47, 23 December 2023
This page is marked for deletion. | |
Reason: This event doesn't exist as a built-in in MTA event. It exists only in the default "admin" resource Actions: Delete (Administrators) - Discuss - What links here - Category
|
This event identifies changes to the player's money if it is changed on the server-side.
Parameters
int oldValue, int newValue
- oldValue: the int amount of money before being changed.
- newValue: the int amount of money after being changed.
Source
The source of this event is the player with which the element had its money changed.
Example
Sending a message when money is changed with the old quantity and the new quantity
function moneyChange(oldValue, newValue) outputChatBox("Your money changed from " .. oldValue .. " to " .. newValue, source) --Message when his money is changed end addEventHandler("onPlayerMoneyChange", getRootElement(), moneyChange)
See Also
Money events
This page is marked for deletion. | |
Reason: Useless template. See onPlayerMoneyChange Actions: Delete (Administrators) - Discuss - What links here - Category
|
Event functions
Shared
- addEvent
- addEventHandler
- cancelEvent
- cancelLatentEvent
- getEventHandlers
- getLatentEventHandles
- getLatentEventStatus
- removeEventHandler
- triggerEvent
- wasEventCancelled