sorry, new to lua so don’t know what “overriding” is :S
[editline]11:03PM[/editline]
did’nt work, i’m probebly making some other this wrong…
[editline]11:06PM[/editline]
Here’s my whole init.lua code so far
AddCSLuaFile( “cl_init.lua” )
AddCSLuaFile( “shared.lua” )
include( ‘shared.lua’ )
resource.AddFile(“models/weapons/w_fists_t.mdl”)
resource.AddFile(“models/weapons/w_fists_t.vvd”)
resource.AddFile(“models/weapons/w_fists_t.phy”)
resource.AddFile(“models/weapons/w_fists_t.sw.vtx”)
resource.AddFile(“models/weapons/w_fists_t.dx90.vtx”)
resource.AddFile(“models/weapons/w_fists_t.dx80.vtx”)
resource.AddFile(“models/weapons/v_punch.mdl”)
resource.AddFile(“models/weapons/v_punch.vvd”)
resource.AddFile(“models/weapons/v_punch.sw.vtx”)
resource.AddFile(“models/weapons/v_punch.dx90.vtx”)
resource.AddFile(“models/weapons/v_punch.dx80.vtx”)
resource.AddFile(“sound/weapons/fists/hl2_slash1.wav”)
resource.AddFile(“sound/weapons/fists/hl2_slash2.wav”)
// Serverside only stuff goes here
/---------------------------------------------------------
Name: gamemode:PlayerLoadout( )
Desc: Give the player the default spawning weapons/ammo
---------------------------------------------------------/
function GM:PlayerSpawn( ply )
ply:SetGravity( 0, 1 )
ply:setMaxHealth( 100, true )
ply:SetWalkSpeed( 200 )
ply:SetRunSpeed( 300 )
end
end
function GM:PlayerLoadout( ply )
if( ply:Team() == 1 ) then
ply:StripWeapons()
ply:Give(“hl2_combo_fists”)
ply:SelectWeapon(“hl2_combo_fists”)
end
self.BasClass:PlayerLoadout( ply )
end
function GM:PlayerInitialSpawn ( ply )
self.BaseClass:PlayerInitialSpawn( ply )
if ply:IsAdmon() then
pl:PrintMessage( HUD_PRINTTALK, “Hello there admin!” )
end
end
function GM:GetFallDamage( ply, fspeed )
return ( fspeed / 8 )
end
function FirstSpawn( ply )
ply:PrintMessage(HUD_PRINTCENTER,"Welcome to Engborg's server!")
end
hook.Add( “PlayerInitialSpawn”, “playerInitialSpawn”, FirstSpawn )