How do i do like
[code]
if ply:IsDead -- what ever after this
[/code]
Can you be more specific? What do you need help with?
[QUOTE=Icejjfish;45478960]Can you be more specific? What do you need help with?[/QUOTE]
so if someone is dead it will stop or start something that i put after it
Use [URL="http://wiki.garrysmod.com/page/GM/PlayerDeath"]http://wiki.garrysmod.com/page/GM/PlayerDeath[/URL] So if you want to say something in the servers console everytime a player dies then do it like this
[CODE]hook.Add("PlayerDeath", "test" function()
ServerLog("Hey")
end)[/CODE]
im not coding a gamemode
hook.Add it's used for everything...function GM:PlayerDeath() it's for gamemode
About this:
[lua]
if ply:IsDead -- what ever after this
[/lua]
This should look like
[lua]
if !ply:Alive() then
end
[/lua]
Since IsDeath doesn't exists, or doesn't have sense have this method because already exists Alive, it's like ask for GetBack or GetLeft since there's a GetForward and GetRight
Please learn from your previous bans and be more descriptive in your title and what you are trying to achieve. I also think you're looking for ply:Alive().
[QUOTE=NiandraLades;45479120]Please learn from your previous bans and be more descriptive in your title and what you are trying to achieve. I also think you're looking for ply:Alive().[/QUOTE]
i got it without ply:alive
[QUOTE=log404;45479042]im not coding a gamemode[/QUOTE]
And? Using GAMEMDOE:PlayerDeath would be for a gamemode; hook.Add works for non-gamemode code.
[QUOTE=log404;45479130]i got it without ply:alive[/QUOTE]
So mark this as solved or give more data about what do you need help because we can't read your mind
[QUOTE=log404;45479130]i got it without ply:alive[/QUOTE]
Okay
What are you actually asking
He got it without ply:Alive() which means he did ply:Health() :v:
Pls mark thread as solved, ty.
[QUOTE=Reyjr43;45483100]He got it without ply:Alive() which means he did ply:Health() :v:
Pls mark thread as solved, ty.[/QUOTE]
i didnt use ply:health() lol
i used a hook instead ty all though
I recommended a hook from the beginning, but okay \ :v: /
you forgot an 'e' in the title to make this authentic
Sorry, you need to Log In to post a reply to this thread.