R3ter Posted June 5, 2016 Posted June 5, 2016 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)
Walid Posted June 5, 2016 Posted June 5, 2016 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
R3ter Posted June 5, 2016 Author Posted June 5, 2016 addEventHandler("onClientPlayerWasted",localPlayer,killl) thanks but it show to the player who died how can i make it shows to the killer ??
ViRuZGamiing Posted June 5, 2016 Posted June 5, 2016 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."
WhoAmI Posted June 5, 2016 Posted June 5, 2016 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)
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now