G1R:MP Forum Alpha
Log in Join
Gothic 1 Remake Multiplayer

The Colony Forum

News, support, development discussions, server communities, and stories from beyond the Barrier.

Colony discussion

Cancellable pre-action hooks for custom resources

Started by RhyZe in Suggestions

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
09-17-2026, 04:02 PM
#1
Hi!

Could G1R:MP expose server-side hooks that let custom resources reject gameplay actions before their effects are applied?
According to the wiki, pickup, drop and damage events report completed changes.
For RP servers, public pre-action hooks would allow ownership checks, protected items and custom combat restrictions.

For example.:

_____________________________________________________

addEventHandler("onPlayerRequestPickup", root,
    function(playerId, objectId)
        -- Custom permission check
        if not canPlayerTakeItem(playerId, objectId) then
            cancelEvent()
        end
    end
)

_____________________________________________________


Similar hooks for dropping, equipping, consuming items and applying damage would be useful. Cancellation should prevent the action without requiring scripts to undo inventory or health changes afterward.

This would complement the existing native validation and completion events. Are public pre-action hooks planned?
Forum Jump: