• GM creation pls HELP
    2 replies, posted
Hi, I have a problem with insert im.weapons in function PlayerLoadout ... plz help ;3 local debug = 1 local tc = 0 function game.addteam(name,im) local tc = tc +1 team.SetUp(tc,name,im.color) --DEBUG if debug != 1 then return false end print("col:",im.color) for _, v in pairs(im.weapons) do print("weapons:",v) end end function GM:PlayerLoadout(ply) for _, v in pairs(im.weapons) do ply:Give(v) end end print( #team.GetAllTeams(),"teams" ) game.addteam("xxx",{ color = Color( 255, 255, 255 ), weapons = {"gmod_tool","weapon_357","weapon_frag"}, model = "test", vanish = false })  
You aren't doing with "im.weapons" inside of game.addteam. Inside of PlayerLoadout, im.weapons is not declared anywhere it looks like.
I know its not declared but i dont know how to implement it ... so I am asking for an example how to fix it..
Sorry, you need to Log In to post a reply to this thread.