• why this no working?
    4 replies, posted
hey i just strated the lua language and how do i do lua i dont understant the lua langauge [code] if player has a physgun then make him god [/code] why this no work? i want player that hold physgun be infinite health
strange, that code works for me. are you sure that you aren't using an outdated version of gmod?
[QUOTE=AVOID;48769948]hey i just strated the lua language and how do i do lua i dont understant the lua langauge [code] if player has a physgun then make him god [/code] why this no work? i want player that hold physgun be infinite health[/QUOTE] you forgot the 'end'.
[QUOTE=AVOID;48769948]hey i just strated the lua language and how do i do lua i dont understant the lua langauge [code] if player has a physgun then make him god [/code] why this no work? i want player that hold physgun be infinite health[/QUOTE] Really?
[CODE] There will be more to it than that but yeah for k,Player in pairs( player.GetAll() ) do if( Player:GetActiveWeapon() == "weapon_physgun" ) then Player:GodEnable( true ) else Player:GodEnable( false ) end end [/CODE] Probably something wrong with that, but yeah, be a dirty fucker and chuck it in a think hook, serverside. Typed on facepunch so it looks like aids with the tabbing and that.
Sorry, you need to Log In to post a reply to this thread.