• Time life, appear immortally for 5 seconds, Gmod.
    1 replies, posted
[B][I][U]hello[/U][/I][/B] there will be a lua, or some form of appearing very lively and remove after 5 seconds .. I mean immortally appear for 5 seconds. the situation is that when I relive, someone kills me with the bazooka, and when I appear again, it'll kill me again ... also used to kill him with the bazooka when it appears ... but enough of this, I want to help me create a lua to make us immortal for 5 seconds, till ready to pull out a gun ... same thing happened in half life 2 dermatch ... when I appear have the opportunity to prepare for 5 seconds. then that immortality is removed to play .. this is very good for the game is more balanced ... but this is not included in the game, then we have to schedule ... How do you grab? Does anyone know how to program something identical? [highlight](User was banned for this post ("Wrong section" - Gran PC))[/highlight]
I believe it's called spawn protection. Something like this should do.. [lua] local time=5 --Delay mortality by n seconds. hook.Add("PlayerSpawn","spawn_protection",function(pl) pl:GodEnable() timer.Simple(time,function(pl) pl:GodDisable() end,pl) end) [/lua]
Sorry, you need to Log In to post a reply to this thread.