Code Monkey home page Code Monkey logo

skm-stealshoes's Introduction

QBCore steal shoe simple script

The main problem with this script is you can steal unlimited shoes from a person because it doesn't check if the target have shoes or not. If you know how to solve this, make a pull ❤️

Preview: https://streamable.com/rh8mp2

Step 1

Add the item in qb-core/shared/items.lua

['weapon_shoe']                = {['name'] = 'weapon_shoe', ['label'] = 'Shoes', 					['weight'] = 900, 		['type'] = 'weapon', 	['ammotype'] = nil,						['image'] = 'shoes.png', 		['unique'] = true, 		['useable'] = false, 	['description'] = 'I promise those are not stolen!'},

Step 2

Search in your inventory this event "inventory:client:UseWeapon" and then add this:

elseif weaponName == "weapon_shoe" then
        GiveWeaponToPed(ped, GetHashKey(weaponName), ammo, false, false)
        SetPedAmmo(ped, GetHashKey(weaponName), 2)
        SetCurrentPedWeapon(ped, GetHashKey(weaponName), true)
        TriggerEvent('qb-hud:client:ToggleWeaponMode', true)  
        TriggerServerEvent('QBCore:Server:RemoveItem', weaponName, 1)
        TriggerEvent('weapons:client:SetCurrentWeapon', weaponData, shootbool)
        currentWeapon = weaponName

Step 3

Add the image in your inventory script!

shoes

⚠️ATTENTION⚠️

You will need a shoe model!

skm-stealshoes's People

Contributors

skrimxyz avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.