I have a militaryRP server and i want staff and donators to spawn with phygun and toolgun but its working i put it in this dir garrysmod/lua/server/weapons.lua
Heres my code
function Custom_Loadout( ply )
//All Staff
if ( ply:IsUserGroup( "owner" ) or ply:IsUserGroup( "community-manager" ) or ply:IsUserGroup( "staff-manager" ) or ply:IsUserGroup( "server-builder" ) or ply:IsUserGroup( "superadmin" ) or ply:IsUserGroup( "admin" ) or ply:IsUserGroup( "moderator" ) or ply:IsUserGroup( "trial-moderator" )) then
ply:Give( "weapon_physgun" )
ply:Give( "weapon_tool" )
end
//Donators
if ( ply:IsUserGroup( "donator" ) or ply:IsUserGroup( "donator+" ) or ply:IsUserGroup( "donator++" ))
ply:Give( "weapon_physgun" )
ply:Give( "weapon_tool" )
end
end
hook.Add( "PlayerLoadout", "CustomGamemodeLoadoutFunction", Custom_Loadout )