Jump to content

I want a resource


[UCG]Mike

Recommended Posts

Posted
  
exports.scoreboard:addScoreboardColumn('Score') 
  
addEventHandler("onPlayerWasted", root, function(attacker,attackerweapon) 
    setElementData( attacker, "Score", getElementData(attacker,"Score")+1) 
    setElementData( source, "Score", getElementData(source,"Score")-1) 
end 
) 
  

Posted
exports.scoreboard:addScoreboardColumn('Score') 
  
addEventHandler("onPlayerWasted", root, function(attacker,attackerweapon) 
    if (getElementData(attacker, "Score") == false) or (getElementData(attacker, "Score") == nil) then 
        setElementData(attacker, "Score", 1) 
        setElementData(source, "Score", -1) 
    else 
        setElementData( attacker, "Score", getElementData(attacker,"Score")+1) 
        setElementData( source, "Score", getElementData(source,"Score")-1) 
end 
) 

He forgot to check or the data even exists.

Posted
exports.scoreboard:addScoreboardColumn('Score') 
  
addEventHandler("onPlayerWasted", root, function(attacker,attackerweapon) 
    if (getElementData(attacker, "Score") == false) or (getElementData(attacker, "Score") == nil) then 
        setElementData(attacker, "Score", 1) 
        setElementData(source, "Score", -1) 
    else 
        setElementData( attacker, "Score", getElementData(attacker,"Score")+1) 
        setElementData( source, "Score", getElementData(source,"Score")-1) 
end 
) 

He forgot to check or the data even exists.

its bug too

KwXhnza.png

You are now in Mark Zone !!!

Posted
  
exports.scoreboard:addScoreboardColumn('Score') 
  
addEventHandler("onPlayerWasted", root, function(attacker,attackerweapon) 
    if getElementData(attacker, "Score") == false or getElementData(attacker, "Score") == nil then 
        setElementData(attacker, "Score", 1) 
        setElementData(source, "Score", -1) 
    else 
        setElementData( attacker, "Score", getElementData(attacker,"Score")+1) 
        setElementData( source, "Score", getElementData(source,"Score")-1) 
end 
) 
  

Posted
  
exports.scoreboard:addScoreboardColumn('Score') 
  
addEventHandler("onPlayerWasted", root, function(attacker,attackerweapon) 
    if getElementData(attacker, "Score") == false or getElementData(attacker, "Score") == nil then 
        setElementData(attacker, "Score", 1) 
        setElementData(source, "Score", -1) 
    else 
        setElementData( attacker, "Score", getElementData(attacker,"Score")+1) 
        setElementData( source, "Score", getElementData(source,"Score")-1) 
end 
) 
  

no bro its not work

No supporters or Moderators here ? :redhotevil:

You are now in Mark Zone !!!

Posted
exports.scoreboard:addScoreboardColumn('Score') 
  
addEventHandler("onPlayerWasted", root, function(attacker,attackerweapon) 
    if (getElementData(attacker, "Score") == false) or (getElementData(attacker, "Score") == nil) then 
        setElementData(attacker, "Score", 1) 
        setElementData(source, "Score", -1) 
    else 
        setElementData( attacker, "Score", getElementData(attacker,"Score")+1) 
        setElementData( source, "Score", getElementData(source,"Score")-1) 
    end 
end 
) 

Forgot end :roll:

Posted

Wrong assumption that the 1st parameter of 'onPlayerWasted' is 'attacker'; where infact it is the totalAmmo (int).

Previously known as MrTasty.

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