ply:Give Admin only?

I tried to give players a weapon when they join depending on their level, but for some reason it only works if they are an admin. I used the DarkRP weapons, any help? There are no errors what so ever. Thanks

hook.Add(“PlayerLoadout”, “GivePlayerSWEPS”, function(ply)
Loadout hook called
timer.Simple(2, function()
if DarkRPWeapons[ply.Level] then
Given wep
Msg("Given “…ply:Nick()…” “…DarkRPWeapons[ply.Level]…”
Msg(“They don’t have a level or the weapon for that level is invalid!”)

DarkRPWeapons = {}
DarkRPWeapons[1] = “weapon_glock2”
DarkRPWeapons[2] = “weapon_fiveseven2”
DarkRPWeapons[3] = “weapon_p2282”
DarkRPWeapons[4] = “weapon_deagle2”
DarkRPWeapons[5] = “weapon_smg1”
DarkRPWeapons[6] = “weapon_mp52”
DarkRPWeapons[7] = “weapon_mac102”
DarkRPWeapons[8] = “weapon_m42”
DarkRPWeapons[9] = “weapon_pumpshotgun2”
DarkRPWeapons[10] = “ls_sniper”
DarkRPWeapons[11] = “weapon_ak472”
DarkRPWeapons[12] = “weapon_ak472”


It was the gunlicense, I didn’t think that would stop the Give() function. I fixed it by changing the GM:PlayerCanPickupWeapon function.

Any admin mods installed?


Try it without ULX installed.

It still does it when ulx isn’t installed.

Any other addons installed?

I removed them all except for counter strike and day of defeat. Still it doesn’t work :S.

Snip - I forgot to mention that I have darkrp installed. It seems to work when I am on sandbox though. Any ideas on how to fix it?


I was using this for testing, on sandbox it works fine but on darkrp nothing happens. Anything that you know of that could cause this within DarkRP or anything that I could look for within DarkRP?

rcon lua_run for k,v in pairs(player.GetAll()) do v:Give([[weapon_real_cs_desert_eagle]]) end



Only thing I know for sure is that PlayerLoadout hook is not being called for all players, do a scan in all files for “PlayerLoadout” and ‘PlayerLoadout’

Or its the darkrp weapon limiting thing, the gun license thing, i cant explain it too well.