• Kill function problem:
    13 replies, posted
Hey all, got a problem with my kill and death code. Everytime a player kills themselves they get the reward, how do I fix this? Code: [Lua] function GM:PlayerDeath(victim,killer,ply) if victim:IsPlayer() then victim:AddDeath() end if killer:IsPlayer() then killer:AddKills() end if killer:IsPlayer() then killer:AddDollars(15) ply:Notify("You killed: "..victim:Name().." and got 15$!") end if killer:Team() == 1 and victim:Team() == 1 then ply:Notify(killer:Name().." betrayed the russians! Kill this traitor!") end if killer:Team() == 2 and victim:Team() == 2 then ply:Notify(killer:Name().." betrayed the US! Make sure this communist pays!") end if ply:IsAdmin() or ply:IsSuperAdmin() then ply:AdminNotify("[Admin|SilentNotify]: "..killer:Name().." killed "..victim:Name()..". If there is a complaint find out if it's RDM!") end end [/lua]
if victim ~= killer [editline]12th May 2011[/editline] +lrn2tab
[lua] function GM:PlayerDeath(victim,killer,ply) if victim:IsPlayer() && !victim == killer then victim:AddDeath() killer:AddKills() killer:AddDollars(15) ply:Notify("You killed: "..victim:Name().." and got 15$!") local killerteam = killer:Team() if killerteam == victim:Team() then if killerteam == 1 then ply:Notify(killer:Name().." betrayed the russians! Kill this traitor!") elseif killerteam == 2 then ply:Notify(killer:Name().." betrayed the US! Make sure this communist pays!") end end if ply:IsAdmin() or ply:IsSuperAdmin() then ply:AdminNotify("[Admin|SilentNotify]: "..killer:Name().." killed "..victim:Name()..". If there is a complaint find out if it's RDM!") end end end [/lua] Wrote in the reply box's but should work jrj996 if you spent less time crying and more time learning you wouldn't need to make threads for such simple things
Spent less time crying? I'm tired of seeing you trolling kids, thats all.
[QUOTE=jrj996;29781629]Spent less time crying? I'm tired of seeing you trolling kids, thats all.[/QUOTE] I'm 36 how am I a kid?
Re-read that sentence.
[QUOTE=jrj996;29781689]Re-read that sentence.[/QUOTE] My bad, and at no point do I troll any threads your low IQ just makes it seem that way.
Look at the thread you were in with science, you instantly started shit with that dude. As did your whole 'group'. Oh and thanks, I see what I did.
[QUOTE=jrj996;29781804]Look at the thread you were in with science, you instantly started shit with that dude. As did your whole 'group'.[/QUOTE] Because he posts in every thread thinking he knows everything all :smug:, when its not true.
[QUOTE=jrj996;29781804]Look at the thread you were in with science, you instantly started shit with that dude. As did your whole 'group'.[/QUOTE] Science posts wrong answers 95% of the time. People need kept in their place when it gets to that stage.
But that was simply a question, not an answer. OH, DERP.
[QUOTE=jrj996;29781911]But that was simply a question, not an answer.[/QUOTE] Incorrect. It was a statement, to which a defence of our actions was given.
[QUOTE=FlapadarV2;29781980]Incorrect. It was a statement, to which a defence of our actions was given.[/QUOTE] I'm talking about the request :l
[QUOTE=jrj996;29782075]I'm talking about the request :l[/QUOTE] There's a difference between trolling and satire. You should learn it. [editline].[/editline] I posted what he needs to do, and a smug comment knowing that what I'd been thinking was entirely correct.
Sorry, you need to Log In to post a reply to this thread.