• Would this code work? If so how can I get it to announce something?
    3 replies, posted
I'm trying to get this code to slay a player for rdming. If they are not "GetMurderer" and they kill a player they are suppose to print a message announcing they RDM'd, then wait 5 seconds and get slain. Would this work? Thank You! [code]function GM:PlayerDeath(ply, Inflictor, attacker ) if IsValid(attacker) && attacker:IsPlayer() then if attacker:GetMurderer() then -- self:SendMessageAll("The murderer has struck again") elseif attacker != ply then if self.ShowBystanderTKs:GetBool() then PrintMessage( HUD_PRINTTALK, attacker:Name() .. " will be slain for killing" .. ply:Name() .. "." ) timer.Simple(5, function () ply:Kill() end[/code]
Here are two things you [b]require[/b]: [url]http://en.wikipedia.org/wiki/Trial_and_error[/url] [url]http://en.wikipedia.org/wiki/Logic[/url]
I updated it some. Anyone think it will work? I can't really test it..
What gamemode is this? And no, you need to look at your syntax, as well you have "ends" that are missing..
Sorry, you need to Log In to post a reply to this thread.