Developer functions - Shark-vil/Clothing-system GitHub Wiki
Hooks:
hook.Run("Clothing.Dev.Equip", player, itemClass, insertData)
Description of parameters:
- player - The entity of the player (Variable type - entity)
- itemClass - Class of clothes (Variable type - string)
- insertData - Dress the item and save it to the database (Variable type - bool)
-- Example:
hook.Run("Clothing.Dev.Equip", player.GetAll()[1], "clothing_vest")
-- If you want the garment to be saved after you restart the server or player reconnect
hook.Run("Clothing.Dev.Equip", player.GetAll()[1], "clothing_vest", true)
hook.Run("Clothing.Dev.Drop", player, itemClass, itemRemvoe)
Description of parameters:
- player - The entity of the player (Variable type - entity)
- itemClass - Class of clothes (Variable type - string)
- itemRemvoe - Delete an item, not throw it away (Variable type - bool)
-- Example:
hook.Run("Clothing.Dev.Drop", player.GetAll()[1], "clothing_vest")
-- If you don't want the player to throw an object:
hook.Run("Clothing.Dev.Drop", player.GetAll()[1], "clothing_vest", true)