I’m trying to make a gamemode thirdperson only.
I kinda got it working by putting the RunConsoleCommand(“thirdperson”); in OnRoundStart. It Puts the player in 3rd person, he can change his weapons but he can’t move or attack.
Here’s my init.lua
AddCSLuaFile( “cl_init.lua” ) //dl that
AddCSLuaFile( “shared.lua” ) //dl that too
include( ‘shared.lua’ ) //load that
// This is called every second to see if we can end the round
if ( !GAMEMODE:InRound() ) then return end for k,v in pairs( team.GetPlayers( TEAM_HUMAN ) ) do if v:Frags() >= 10 then GAMEMODE:RoundEndWithResult( v ) end end
// This is called after a player wins in a free for all
function GM:OnRoundWinner( ply, resulttext )
ply:AddScore( 1 ) // Let's pretend we have AddScore for brevity's sake
// Called when the round ends
function GM:OnRoundEnd( num )
for k,v in pairs( team.GetPlayers( TEAM_HUMAN ) ) do v:SetFrags( 0 ) // Reset their frags for next round end
And I’m using fretta if that helps at all.