Hello, I have a spectate system that follows people in third person.. What I want to add to it is when someone presses ctrl on their keyboard it allows them to free roam. Could anybody help me do this?
My current spectator code: [CODE]local nextPress = CurTime();
hook.Add("Think","jbMousePressSpec",function()
if LocalPlayer():Team() == TEAM_GUARD_DEAD or LocalPlayer():Team() == TEAM_PRISONER_DEAD then
if nextPress > CurTime() then return end
if input.IsMouseDown(MOUSE_LEFT) then
RunConsoleCommand("jb_spectate_switch_plus");
JB:DebugPrint("Spectating next entity");
elseif input.IsMouseDown(MOUSE_RIGHT) then
RunConsoleCommand("jb_spectate_switch_minus");
JB:DebugPrint("Spectating previous entity");
else
return
end
nextPress = CurTime()+0.5;
end
end);
local barTall = 70;
hook.Add("HUDPaint", "jbSpectatorHud", function()
if LocalPlayer():GetObserverMode() ~= OBS_MODE_CHASE then return end[/CODE]
Any help would be appreciated.
Dude, everyday you're creating a new thread about fixing JB. Maybe you shall stop and go to the coderhire? THIS IS NOT ****** SPECTATOR MODE!!!! Sorry, but if you dont know what lua mean (or just functions) dont try to fix this by yourself.
Sorry, you need to Log In to post a reply to this thread.