Jump to content

help


R3ter

Recommended Posts

Posted
kills=0 
  
function killl( killer ) 
  
  
kills=kills+1 
  
outputChatBox("kills="..kills) 
  
end 
  
addEventHandler("onClientPlayerWasted",getRootElement(),killl) 

can anyone tell me why is that is "kills=" shows for everyone ??

(it's on client-side)

Posted
addEventHandler("onClientPlayerWasted",localPlayer,killl) 

Do not yield your back to your enemy, might feel something strange in your ass.

Two things are infinite the universe and human stupidity and i'm not sure about the universe.

UF: IsTextInGridList | GetGridListRowIndexFromText | Table.removeValue | removeHex | dxDrawTriangle

Skype: SaSuki102 | About Me | Youtube channel | Lua Tips & Tricks | Lua Strings | Lua Tables | Lua Operators

Posted
addEventHandler("onClientPlayerWasted",localPlayer,killl) 

thanks but it show to the player who died how can i make it shows to the killer ??

Posted
kills = 0 
  
function killl(killer) 
   kills = kills + 1 
   outputChatBox("kills="..kills, killer) -- 2nd argument (visibleTo) 
end 
  
addEventHandler("onClientPlayerWasted",getRootElement(), killl) 

"If debugging is the process of removing software bugs, then programming must be the process of putting them in."

Posted

If you want to collect how many kills did player get you have to make it s-side and store it in table.

local kills = {} 
  
addEventHandler("onPlayerWasted", root, function(_, killer) 
    if isElement(killer) and getElementType(killer) == "player" then 
        local killInt = kills[killer] 
        if not killInt then 
            killInt = 0 
        end 
         
        kills[killer] = killInt + 1 
    end 
end) 

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