Prop hunt lua question

i downloaded the prop hunt gamemode, but in the gamemode itself, it has duplicates and even 3x the same lua, example
prop_hunt > gamemode > lua has about 7 lua’s
prop_hunt > gamemode has the same 7 lua’s
the exact same!
also
there is prop_hunt > player_class
prop_hunt > gamemode > player_class
and prop_hunt > gamemode > lua > player_class
and inside has the EXACT SAME LUA

I don’t understand this, i want to add this code
[lua]
if ply:IsUserGroup(“admin”) then
ply:SetModel(“models/player/gabewellersuit.mdl”)
[/lua]
i added it in each class_hunter.lua’s but still no luck so it looks like
[lua]
// Called by spawn and sets loadout
function CLASS:Loadout(pl)
pl:GiveAmmo(64, “Buckshot”)
pl:GiveAmmo(255, “SMG1”)
if ply:IsUserGroup(“admin”) then
print(“works2”)
ply:SetModel(“models/player/gabewellersuit.mdl”)
pl:Give(“weapon_crowbar”)
pl:Give(“weapon_shotgun”)
pl:Give(“weapon_smg1”)
pl:Give(“item_ar2_grenade”)

local cl_defaultweapon = pl:GetInfo("cl_defaultweapon") 
 
if pl:HasWeapon(cl_defaultweapon) then 
	pl:SelectWeapon(cl_defaultweapon)
end 

end
[/lua]
I am trying to use ulx groups so for this instance admin, no luck :frowning:
i have added the model to the server in both addons and root, i have it on client (manual install) so it is there
and i have precached it in init.lua and every class_hunter.lua
it ain’t working

ALSO It uses the fretta base, which i have also added to gamemodes

Ok so even though you didn’t post your error, you need to add an extra to the code because you didn’t close the if pl:HasWeapon function.

[lua]
function GM:PlayerSetModel(pl)
local player_model = “models/Gibs/Antlion_gib_small_3.mdl”

if pl:Team() == TEAM_HUNTERS then
	player_model = "models/player/combine_super_soldier.mdl"
end

util.PrecacheModel(player_model)
pl:SetModel(player_model)

end
[/lua]

How do i edit this, so if admin give a different model, i tried this
[lua]
function GM:PlayerSetModel(pl)
local player_model = “models/Gibs/Antlion_gib_small_3.mdl”

if pl:Team() == TEAM_HUNTERS then
	player_model = "models/player/combine_super_soldier.mdl"
elseif pl:Team() == TEAM_HUNTERS and ply:IsAdmin() then
	print("works2")
pl:SetModel("models/player/gabewellersuit.mdl")
end
	util.PrecacheModel(player_model)
pl:SetModel(player_model)

end
[/lua]

But it dont work!!


if pl:Team() == TEAM_HUNTERS then
if pl:IsAdmin() then
//
else
		player_model = "models/player/combine_super_soldier.mdl"
end
	end

What if i want to use a ulx group such as donator?

[editline]9th September 2013[/editline]

Yep thanks solved
code:
[lua]
function GM:PlayerSetModel(pl)
local player_model = “models/Gibs/Antlion_gib_small_3.mdl”

if pl:Team() == TEAM_HUNTERS then
if pl:IsUserGroup("donator") then
player_model = "models/player/donator.mdl"
elseif pl:IsUserGroup("admin") then
player_model = "models/player/admin.mdl"

else
player_model = “models/player/combine_super_soldier.mdl”
end
end

util.PrecacheModel(player_model)
pl:SetModel(player_model)

end
[/lua]

Thanks everyone <3