Kartik Scripts

openMenuFor

Opens one of this resource's menus on a specific player, with that menu's ordinary rules intact.

💡 Syntax

local ok, err = exports['kartik-clothing']:openMenuFor(target, kind)

📥 Parameters

ParameterTypeOptionalDescription
targetnumberNoServer ID of the player.
kindstringYesWhich menu to open. Defaults to clothing.
KindOpens
clothing · apparelClothing store
barber · hairBarber & hair studio
tattoosTattoo parlour
wardrobeSaved outfits
pedPed Changer
creatorFull character creator
studioCustom garment design studio

📤 Returns

TypeDescription
booleantrue if the menu was opened.
string?Error code when it was not: no_player or unknown_menu.

📝 Example

exports['kartik-clothing']:openMenuFor(playerId, 'barber')

[!WARNING] ped still runs the player's own Config.PedShopOwnersOnly check and is refused for a player who owns nothing. To edit a body regardless of what they own, use grantSurgery, which waives the catalogue rather than enforcing it.

[!NOTE] The caller is not checked. A server export is already inside the trust boundary, the resource calling it decides who is allowed to.

On this page