Jump to content

Whats wrong? [SOLVED]


Tycka

Recommended Posts

I don't get any error/warning, and I get message You eat food name

Here is code:

function onPlayerSickPlus(itemName,itemInfo,data) 
    if data == "sick" then 
    if itemName == "Rotten Pizza" or itemName == "Rotten Burger" or itemName == "Rotten Milk" or itemName == "Dirty water" or itemName == "Raw Meat"  then 
    value = gameplayVariables["loseSick"] 
    end 
    setPedAnimation (source,"FOOD","EAT_Burger",nil,false,false,nil,false) 
    setElementData(source,itemName,getElementData(source,itemName)-1)  
    addPlayerStats (source,"sick",value) 
end 
triggerClientEvent (source, "displayClientInfo", source,"Food",shownInfos["youconsumed"].." "..itemName,22,255,0) 
triggerClientEvent(source,"refreshInventoryManual",source) 
end 
addEvent("onPlayerSickPlus",true) 
addEventHandler("onPlayerSickPlus",getRootElement(),onPlayerSickPlus) 

Animation didn't start, sick didn't - and and food didn't -1.

Edited by Guest
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...