Garry's Mod Wiki

SANDBOX:CanArmDupe

  boolean, string SANDBOX:CanArmDupe( Player ply )

Description

Called when a player attempts to "arm" a duplication with the Duplicator tool. Return false to prevent the player from sending data to server, and to ignore data if it was somehow sent anyway.

Arguments

1 Player ply
The player who attempted to arm a dupe.

Returns

1 boolean
Can the player arm a dupe or not.
2 string
If given and the return value above is false, overrides the error message displayed to the player.
This was recently added in version (2024.07.10). It might only be available on the Dev Branch right now.