Hi, im new to scripting and i would like to try create my own gamemode for a project. I have done some of the basics and added fists to my init.lua and when i tested them they were there but when i swing a punch in thin air it still make a sound as if its made impact like a thud sound and when i right click it knocks on a door that isnt there, can anyone help me? Here is the init.lua file i made:
AddCSLuaFile( "cl_init.lua" )
AddCSLuaFile( "shared.lua" )
include( 'shared.lua' )
-- Fists
resource.AddFile("models/weapons/w_fists.vvd")
resource.AddFile("models/weapons/w_fists.sw.vtx")
resource.AddFile("models/weapons/w_fists.phy")
resource.AddFile("models/weapons/w_fists.mdl")
resource.AddFile("models/weapons/w_fists.dx90.vtx")
resource.AddFile("models/weapons/w_fists.dx80.vtx")
resource.AddFile("models/weapons/v_fists.vvd")
resource.AddFile("models/weapons/v_fists.sw.vtx")
resource.AddFile("models/weapons/v_fists.mdl")
resource.AddFile("models/weapons/v_fists.dx90.vtx")
resource.AddFile("models/weapons/v_fists.dx80.vtx")
// Serverside only stuff goes here
/*---------------------------------------------------------
Name: gamemode:PlayerLoadout( )
Desc: Give the player the default spawning weapons/ammo
---------------------------------------------------------*/
function GM:PlayerSpawn( ply )
self.BaseClass:PlayerSpawn( ply )
ply:SetGravity( 0,90 )
ply:SetMaxHealth( 100, true )
ply:Setwalkspeed( 200 )
ply:SetRunSpeed( 400 )
end
function GM:PlayerLoadout( ply )
ply:StripWeapons()
ply:Give( "weapon_crowbar" )
ply:Give( "weapon_pistol" )
ply:Give( "Glitchvid's-rp-fists" )
end
function GM:PlayerInitialSpawn( ply )
self.BaseClass:PlayerInitialSpawn( ply )
if pl:IsAdmin() then
pl:PrintMessage( HUD_PRINTTALK, "Welcome to True-RP!" )
end
end
Sorry if its a bit big.
This is the code of your gamemode, not of the fists themselves.
Sorry, you need to Log In to post a reply to this thread.