Server Name: Deathrun server 1 & 2
Suggestion Title: Third Person chat command
How would it benefit the server?
Over the course of about 6 months of moderating deathrun I've noticed a lot of newbies asking how to use thirdperson and trying to use the chat command "!3p" or something like that to toggle it, so I think that for the sake of the new people to the deathrun community that we should add the command.
Potential Issues/Exploits?
I can't think of any issues or exploits.
Additional notes :
I've made a rough version of the code that could be used to make this happen, it's just a case of making it a .lua and adding it to a autorun folder.
if ( CLIENT ) then
local on = false
local function toggle()
on = !on
if on == true then
LocalPlayer():PrintMessage( HUD_PRINTTALK, "Third person mode enabled." )
LocalPlayer():ConCommand("deathrun_thirdperson 1")
else
LocalPlayer():PrintMessage( HUD_PRINTTALK, "Third person mode disabled." )
LocalPlayer():ConCommand("deathrun_thirdperson 0")
end
end
concommand.Add( "thirdperson_toggle", toggle )
end
if ( SERVER ) then
hook.Add("PlayerSay", "ThirdPerson", function (ply, text, public)
text = string.lower( text )
if (text == "!3p") then
ply:SendLua([[RunConsoleCommand("thirdperson_toggle")]])
return("")
end
end)
end