Jump to content

مساعدة بمود جوع للحياة الواقعية


Recommended Posts

السلام عليكم شباب ديه اول مرة ليا انشر بذا المجال ياريت حد يفيدني 

انا صممت مود جوع بس ناقصلي ايفينت و فنكشن مثلا لما يأكل اي شي مثل الهوت دوج يشبع بمعدل معين 

وشكرا 

ياريت حدا يفيدني 

Link to comment

ممكن حضرتك تقلي الايفينت بتاع لما ياكل هوت دوج اصلا ؟

 

GUIEditor = {
    label = {},
    progressbar = {}
}
addEventHandler ("onClientResourceStart",getResourceRootElement(getThisResource()),
    function()
        hungerProcess= guiCreateProgressBar(0.6, 0.01, 0.05, 0.03, true)
        guiMoveToBack(hungerProcess)
        guiProgressBarSetProgress(hungerProcess,100)
		hungerLabel = guiCreateLabel(0.606, 0.015, 0.04, 0.02, "Hunger State", true)
        guiLabelSetColor(hungerLabel, 253, 0, 0)
		guiSetFont(hungerLabel,"default-small")
		setTimer (dropDownHungerState,200,0,getLocalPlayer())		
    end
)

function setHungerState (player,hungerState)
  if (player == getLocalPlayer()) then
    guiProgressBarSetProgress(hungerProcess,hungerState)
  end
end 

function getHungerState (player)
  if (player == getLocalPlayer()) then
    return guiProgressBarGetProgress(hungerProcess)
  end
end

function dropDownHungerState (player)
  if (player == getLocalPlayer()) then
    guiProgressBarSetProgress(hungerProcess,guiProgressBarGetProgress(hungerProcess) -1)
    if (guiProgressBarGetProgress(hungerProcess) == 0) then
      setElementHealth (player,getElementHealth (player) -25)
      outputChatBox ("FAST! You'll get die when you don't eat!",255,0,0,false)
    elseif (guiProgressBarGetProgress(hungerProcess) == 10) then
      outputChatBox ("Warning! You begin to become hungry!",255,0,0,false)
    end
  end
end 

addEventHandler ("onClientPlayerSpawn",getRootElement(),
function (team)
  setHungerState (source,100)
end)

ده الكود

 

الفكرة منشورة اعرف بس انا غيرت شوي اشياء

Link to comment

كودي اهو 

GUIEditor = {
    label = {},
    progressbar = {}
}
addEventHandler ("onClientResourceStart",getResourceRootElement(getThisResource()),
    function()
        hungerProcess= guiCreateProgressBar(0.6, 0.01, 0.05, 0.03, true)
        guiMoveToBack(hungerProcess)
        guiProgressBarSetProgress(hungerProcess,100)
		hungerLabel = guiCreateLabel(0.606, 0.015, 0.04, 0.02, "Hunger State", true)
        guiLabelSetColor(hungerLabel, 253, 0, 0)
		guiSetFont(hungerLabel,"default-small")
		setTimer (dropDownHungerState,200,0,getLocalPlayer())		
    end
)

function setHungerState (player,hungerState)
  if (player == getLocalPlayer()) then
    guiProgressBarSetProgress(hungerProcess,hungerState)
  end
end 

function getHungerState (player)
  if (player == getLocalPlayer()) then
    return guiProgressBarGetProgress(hungerProcess)
  end
end

function dropDownHungerState (player)
  if (player == getLocalPlayer()) then
    guiProgressBarSetProgress(hungerProcess,guiProgressBarGetProgress(hungerProcess) -1)
    if (guiProgressBarGetProgress(hungerProcess) == 0) then
      setElementHealth (player,getElementHealth (player) -25)
      outputChatBox ("FAST! You'll get die when you don't eat!",255,0,0,false)
    elseif (guiProgressBarGetProgress(hungerProcess) == 10) then
      outputChatBox ("Warning! You begin to become hungry!",255,0,0,false)
    end
  end
end 

addEventHandler ("onClientPlayerSpawn",getRootElement(),
function (team)
  setHungerState (source,100)
end)

 

Link to comment
10 hours ago, Jack Tom said:

انا ما اعرفه

كيف سويته اذن O.o

..


سوي المود من اول لاهنت .. او يكفيك تسوي التصميم وبنعطيك الاكواد المطلوبة
وانت حاول مع الاكواد واذا احتجت مساعدة .. حنا موجودين

Link to comment
14 minutes ago, Killer Project said:

كيف سويته اذن O.o

..


سوي المود من اول لاهنت .. او يكفيك تسوي التصميم وبنعطيك الاكواد المطلوبة
وانت حاول مع الاكواد واذا احتجت مساعدة .. حنا موجودين

حبي انا ناقصلي كود اكل الهوت دوج مو كودات المود نفسه 

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...