uyuyorumstore

um-tricks

Installation guide for um-tricks

Animated trick knives (butterfly, karambit) and usable hand toys (Zippo, coin, cards, yo-yo) with Halloween skins, synced to nearby players.

Install

Icons

Copy everything in um-tricks/setup/images into ox_inventory/web/images.

Weapons

Add inside Weapons = { ... }:

ox_inventory > data > weapons.lua
['WEAPON_BUTTERFLY'] = {
    label = 'Butterfly Knife',
    weight = 300,
    durability = 0.1,
    anim = { 'anim@melee@switchblade@holster', 'unholster', 200, 'anim@melee@switchblade@holster', 'holster', 600 },
},
['WEAPON_KARAMBIT'] = {
    label = 'Karambit',
    weight = 250,
    durability = 0.1,
    anim = { 'anim@melee@switchblade@holster', 'unholster', 200, 'anim@melee@switchblade@holster', 'holster', 600 },
},
['WEAPON_BUTTERFLY_HW'] = {
    label = 'Bone Butterfly',
    weight = 300,
    durability = 0.1,
    anim = { 'anim@melee@switchblade@holster', 'unholster', 200, 'anim@melee@switchblade@holster', 'holster', 600 },
},
['WEAPON_KARAMBIT_HW'] = {
    label = 'Bone Karambit',
    weight = 250,
    durability = 0.1,
    anim = { 'anim@melee@switchblade@holster', 'unholster', 200, 'anim@melee@switchblade@holster', 'holster', 600 },
},

Items

ox_inventory > data > items.lua
['zippo'] = {
    label = 'Zippo',
    weight = 60,
    close = true,
    description = 'Brushed chrome, the lid clicks open',
},
['coin'] = {
    label = 'Coin',
    weight = 10,
    close = true,
    description = 'A lucky brass coin',
},
['cards'] = {
    label = 'Playing Cards',
    weight = 90,
    close = true,
    description = 'A worn deck, red backs',
},
['yoyo'] = {
    label = 'Yo-yo',
    weight = 60,
    close = true,
    description = 'Red, with a long cotton string',
},
['zippo_hw'] = {
    label = 'Ghost Zippo',
    weight = 60,
    close = true,
    description = 'Blackened, a skull that glows, burns green',
},
['coin_hw'] = {
    label = 'Skull Coin',
    weight = 10,
    close = true,
    description = 'Its eyes glow red in the dark',
},
['cards_hw'] = {
    label = 'Haunted Cards',
    weight = 90,
    close = true,
    description = 'Spider web backs, a skull glowing on each',
},
['yoyo_hw'] = {
    label = "Jack-o'-Yo-yo",
    weight = 60,
    close = true,
    description = 'A carved pumpkin that lights up as it spins',
},

Icons

Copy everything in um-tricks/setup/images into qb-inventory/html/images.

Weapons

qb-core > shared > weapons.lua
[`weapon_butterfly`]    = { name = 'weapon_butterfly',    label = 'Butterfly Knife', weapontype = 'Melee', ammotype = nil, damagereason = 'Knifed / Stabbed / Eviscerated' },
[`weapon_karambit`]     = { name = 'weapon_karambit',     label = 'Karambit',        weapontype = 'Melee', ammotype = nil, damagereason = 'Knifed / Stabbed / Eviscerated' },
[`weapon_butterfly_hw`] = { name = 'weapon_butterfly_hw', label = 'Bone Butterfly',  weapontype = 'Melee', ammotype = nil, damagereason = 'Knifed / Stabbed / Eviscerated' },
[`weapon_karambit_hw`]  = { name = 'weapon_karambit_hw',  label = 'Bone Karambit',   weapontype = 'Melee', ammotype = nil, damagereason = 'Knifed / Stabbed / Eviscerated' },
qb-core > shared > items.lua
weapon_butterfly    = { name = 'weapon_butterfly',    label = 'Butterfly Knife', weight = 300, type = 'weapon', ammotype = nil, image = 'WEAPON_BUTTERFLY.png',    unique = true, useable = false, description = 'A balisong, flips open in the hand' },
weapon_karambit     = { name = 'weapon_karambit',     label = 'Karambit',        weight = 250, type = 'weapon', ammotype = nil, image = 'WEAPON_KARAMBIT.png',     unique = true, useable = false, description = 'A curved blade with a finger ring' },
weapon_butterfly_hw = { name = 'weapon_butterfly_hw', label = 'Bone Butterfly',  weight = 300, type = 'weapon', ammotype = nil, image = 'WEAPON_BUTTERFLY_HW.png', unique = true, useable = false, description = 'Glowing runes, bone handles' },
weapon_karambit_hw  = { name = 'weapon_karambit_hw',  label = 'Bone Karambit',   weight = 250, type = 'weapon', ammotype = nil, image = 'WEAPON_KARAMBIT_HW.png',  unique = true, useable = false, description = 'A glowing edge, a bone handle' },

Items

qb-core > shared > items.lua
zippo    = { name = 'zippo',    label = 'Zippo',          weight = 60, type = 'item', image = 'zippo.png',    unique = false, useable = true, shouldClose = true, description = 'Brushed chrome, the lid clicks open' },
coin     = { name = 'coin',     label = 'Coin',           weight = 10, type = 'item', image = 'coin.png',     unique = false, useable = true, shouldClose = true, description = 'A lucky brass coin' },
cards    = { name = 'cards',    label = 'Playing Cards',  weight = 90, type = 'item', image = 'cards.png',    unique = false, useable = true, shouldClose = true, description = 'A worn deck, red backs' },
yoyo     = { name = 'yoyo',     label = 'Yo-yo',          weight = 60, type = 'item', image = 'yoyo.png',     unique = false, useable = true, shouldClose = true, description = 'Red, with a long cotton string' },
zippo_hw = { name = 'zippo_hw', label = 'Ghost Zippo',    weight = 60, type = 'item', image = 'zippo_hw.png', unique = false, useable = true, shouldClose = true, description = 'Blackened, a skull that glows, burns green' },
coin_hw  = { name = 'coin_hw',  label = 'Skull Coin',     weight = 10, type = 'item', image = 'coin_hw.png',  unique = false, useable = true, shouldClose = true, description = 'Its eyes glow red in the dark' },
cards_hw = { name = 'cards_hw', label = 'Haunted Cards',  weight = 90, type = 'item', image = 'cards_hw.png', unique = false, useable = true, shouldClose = true, description = 'Spider web backs, a skull glowing on each' },
yoyo_hw  = { name = 'yoyo_hw',  label = "Jack-o'-Yo-yo",  weight = 60, type = 'item', image = 'yoyo_hw.png',  unique = false, useable = true, shouldClose = true, description = 'A carved pumpkin that lights up as it spins' },

Server.cfg

Start um-tricks after your framework and inventory:

server.cfg
ensure ox_lib
ensure qbx_core # or qb-core / es_extended
ensure ox_inventory # or qb-inventory
ensure um-tricks

Usage

  • Knives: the draw plays when taken out, G plays the tricks. Players can rebind it in Settings > Key Bindings > FiveM
  • Toys: every use plays the next trick

Test with /giveitem [id] yoyo 1 or /giveitem [id] weapon_karambit 1.

Requirements

  • ox_lib
  • A framework: qbx_core, qb-core or es_extended

On this page