Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add PLAYER_EVENT_ON_CAN_INIT_TRADE #83

Merged
merged 5 commits into from
Dec 30, 2022
Merged

Conversation

r-o-b-o-t-o
Copy link
Member

Adds a new Player event:

PLAYER_EVENT_ON_CAN_INIT_TRADE = 48, // (event, player, target) - Can return false to prevent the trade

Example Lua snippet:

local PLAYER_EVENT_ON_CAN_INIT_TRADE = 48

local function OnTrade(event, player, target)
    print(player:GetName() .. " initiated a trade with " .. target:GetName())
    return false -- prevent the trade
end
RegisterPlayerEvent(PLAYER_EVENT_ON_CAN_INIT_TRADE, OnTrade)

@r-o-b-o-t-o r-o-b-o-t-o merged commit 1e57b45 into master Dec 30, 2022
@r-o-b-o-t-o r-o-b-o-t-o deleted the feat/on-can-init-trade branch December 30, 2022 23:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant