• Small lua fix
    2 replies, posted
Cant't get this hook (function) working [CODE]hook.Add( "TTTPrepareRound", "Resetkill", function(ply) if TTTPrepareRound then ply:SetNWInt( 'KillNetInt', 0 ) end end ) [/CODE]
The hook works fine, what is TTTPrepareRound in your if statement and is ply defined? If not then look at this example code to help. [code] hook.Add("YourHook","UniqueName", function() --run code below when hook is called for _, ply in pairs( player.GetAll() ) do --get all players and loop through them ply:SetNWInt( 'kills', 0) --set each players networked int to 0 end end) [/code]
[QUOTE=lime150;47167194]Cant't get this hook (function) working [CODE]hook.Add( "TTTPrepareRound", "Resetkill", function(ply) if TTTPrepareRound then ply:SetNWInt( 'KillNetInt', 0 ) end end ) [/CODE][/QUOTE] TTTPrepareRound doesn't provide a ply argument. And delete the if statement, it's useless.
Sorry, you need to Log In to post a reply to this thread.