Login to ZARP
|
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