Login to ZARP
|
if ( CLIENT ) then
local function toggle()
local on = LocalPlayer():GetInfoNum("deathrun_thirdperson" , 0)
if on == 0 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" or text == "!thirdperson") then
ply:ConCommand("thirdperson_toggle")
return("")
end
end)
end