Jump to content

MTA DayZ Bug a5.5.6 Version


JeweL

Recommended Posts

  • Scripting Moderators
1 hour ago, JeweL said:

Can anyone help me too?

The gamemode a5.5.6 DayZ MTA
  The animations get stuck when they give me a Medic Kit, food or water ... can someone help me please!

Set loop to false in setPedAnimation.

Link to comment
9 hours ago, majqq said:

Set loop to false in setPedAnimation.

It's already "false".

 

function onPlayerRequestChangingStats(itemName,itemInfo,data)
if data == "food" then
    if itemName == "Burger" then
        blood = 300
    elseif itemName == "Pizza" then
        blood = 300
    elseif itemName == "Cooked Meat" then
        blood = 800
    elseif itemName == "Beans Can" then
        blood = 200
    elseif itemName == "Pasta Can" then
        blood = 200
    end
    setPedAnimation (source,"FOOD","EAT_Burger",nil,false,false,nil,false)
    setElementData(source,itemName,getElementData(source,itemName)-1)
    addPlayerStats (source,"blood",blood)
    addPlayerStats (source,data,gameplayVariables["foodrestore"]) -- Restores a random amount between 40-100 (hunger) - default: 100
elseif data == "thirst" then
    setElementData(source,itemName,getElementData(source,itemName)-1)
    addPlayerStats (source,data,gameplayVariables["thirstrestore"]) -- Restores a random amount between 40-100 (thirst) default: 100
    setPedAnimation (source,"VENDING","VEND_Drink2_P",nil,false,false,nil,false) 
    if itemName == "Water Bottle" then
        setElementData(source,"Empty Water Bottle",(getElementData(source,"Empty Water Bottle") or 0)+1)
    end
end
triggerClientEvent (source, "displayClientInfo", source,"Food",shownInfos["youconsumed"].." "..itemName,22,255,0)
triggerClientEvent(source,"refreshInventoryManual",source)
end
addEvent("onPlayerRequestChangingStats",true)
addEventHandler("onPlayerRequestChangingStats",getRootElement(),onPlayerRequestChangingStats)

Link to comment
  • Scripting Moderators
26 minutes ago, JeweL said:

It's already "false".

 

function onPlayerRequestChangingStats(itemName,itemInfo,data)
if data == "food" then
    if itemName == "Burger" then
        blood = 300
    elseif itemName == "Pizza" then
        blood = 300
    elseif itemName == "Cooked Meat" then
        blood = 800
    elseif itemName == "Beans Can" then
        blood = 200
    elseif itemName == "Pasta Can" then
        blood = 200
    end
    setPedAnimation (source,"FOOD","EAT_Burger",nil,false,false,nil,false)
    setElementData(source,itemName,getElementData(source,itemName)-1)
    addPlayerStats (source,"blood",blood)
    addPlayerStats (source,data,gameplayVariables["foodrestore"]) -- Restores a random amount between 40-100 (hunger) - default: 100
elseif data == "thirst" then
    setElementData(source,itemName,getElementData(source,itemName)-1)
    addPlayerStats (source,data,gameplayVariables["thirstrestore"]) -- Restores a random amount between 40-100 (thirst) default: 100
    setPedAnimation (source,"VENDING","VEND_Drink2_P",nil,false,false,nil,false) 
    if itemName == "Water Bottle" then
        setElementData(source,"Empty Water Bottle",(getElementData(source,"Empty Water Bottle") or 0)+1)
    end
end
triggerClientEvent (source, "displayClientInfo", source,"Food",shownInfos["youconsumed"].." "..itemName,22,255,0)
triggerClientEvent(source,"refreshInventoryManual",source)
end
addEvent("onPlayerRequestChangingStats",true)
addEventHandler("onPlayerRequestChangingStats",getRootElement(),onPlayerRequestChangingStats)

Try changing:

setPedAnimation (source,"FOOD","EAT_Burger",nil,false,false,nil,false)

To:

setPedAnimation(source, "FOOD","EAT_Burger", -1, false, false, false, false, -1, false)

For future please use "Code", help yourself and others.

ocKDM0l.png

If you want you can use newer version of DayZ mode because yours is very outdated.

https://github.com/NullSystemWorks/mtadayz

  • Thanks 1
Link to comment
21 minutes ago, majqq said:

Try changing:


setPedAnimation (source,"FOOD","EAT_Burger",nil,false,false,nil,false)

To:


setPedAnimation(source, "FOOD","EAT_Burger", -1, false, false, false, false, -1, false)

For future please use "Code", help yourself and others.

ocKDM0l.png

If you want you can use newer version of DayZ mode because yours is very outdated.

https://github.com/NullSystemWorks/mtadayz

thx for gamemode!

Link to comment
function zombieSpawning()
 local x, y, z = getElementPosition(getLocalPlayer())
local material,hitX, hitY, hitZ = isObjectAroundPlayer2 ( getLocalPlayer(), 30, 3 )
if material == 0 and not isInBuilding(x,y,z) then
    triggerServerEvent("createZomieForPlayer",getLocalPlayer(),hitX, hitY, hitZ)
end
end
setTimer(zombieSpawning,3000,0)

Another one bug ... zombie didnt spawn..

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