Jump to content

مسأعد في كود ! |مسأعدة | ء


#FeldMan

Recommended Posts

local x,y = guiGetScreenSize()

local show = true

setElementData(localPlayer, "thirsty", 30)

function drawHud()

    if (show==true) then

        local thirsty = getElementData(localPlayer, "thirsty")

        dxDrawRectangle(473, 109, 92, 27, tocolor(0, 0, 0, 150))

        dxDrawRectangle(x-326, 34+80, thirsty*3, 17, tocolor(1, 96, 253, 255))

        dxDrawText("Fatigue", 499, 114, 563, 131, tocolor(255, 255, 255), 1, "default-bold", "center")

    end
end

addEventHandler("onClientRender", root, drawHud)


setTimer(function()

    local under1 = getElementData(localPlayer, "thirsty")

    setElementData(localPlayer, "thirsty", under1-1)

end, 2000, 0) 

addEventHandler("onClientPlayerWeaponFire", root, setTimer)

function die()

    local piageci = getElementData(localPlayer, "thirsty")


    if (piageci==0) then

        setElementData(localPlayer, "thirsty", 10)

        setElementData(localPlayer, "thirsty", 20)

        setElementData(localPlayer, "thirsty", 30)

    setPedAnimation(thePed, "thirsty", "WOMAN_walknorm")

    end

end

addEventHandler("onClientPlayerWeaponFire", root, die)

-- Hide the hud when the resource is started

local components = { "weapon", "ammo", "health", "clock", "money", "breath", "armour", "wanted" }

addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()),

function ()

    for _, component in ipairs( components ) do

        setPlayerHudComponentVisible( component, false )

    end

end)

function fixhud()

    setPlayerHudComponentVisible( component, false )

end

addCommandHandler("fixhud", fixhud)

أبي اخليه لما ألأعب يمشي ينقص الشريط وبس يوقف يرجع يعبي ممكن مسأعدة لو حأبب

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...