LUA Help visible drawbox with specific weapon

malonex

Member
Joined
Nov 22, 2023
Messages
10
Solutions
1
Reaction score
0
Is it possible to make a drawbox appear only if I have a specific weapon? lua
 
Solution
Is it possible to make a drawbox appear only if I have a specific weapon? lua
try something like this (the code was not tested and is just to give you an idea)
PHP:
require "lib.moonloader"

function main()
    while not isSampAvailable() do wait(0) end
        
    while true do
        wait(0)

        local W = getCurrentCharWeapon(PLAYER_PED)

        if W == {weapon ID HERE}then
            renderDrawBox(float posX, float posY, float sizeX, float sizeY, uint color)
        end
    end
end

0x73616D

Active member
Joined
Apr 18, 2021
Messages
135
Solutions
1
Reaction score
68
Location
0x73616D
Is it possible to make a drawbox appear only if I have a specific weapon? lua
try something like this (the code was not tested and is just to give you an idea)
PHP:
require "lib.moonloader"

function main()
    while not isSampAvailable() do wait(0) end
        
    while true do
        wait(0)

        local W = getCurrentCharWeapon(PLAYER_PED)

        if W == {weapon ID HERE}then
            renderDrawBox(float posX, float posY, float sizeX, float sizeY, uint color)
        end
    end
end
 
Solution
Top