What I’m trying to do is pick a player model out of a table, and then set the material for that model.
So a short inaccurate example would be:
[lua]function PlayerModel( pl, args )
local playermodels = {}
playermodels[1] = {“models/player/roflplayer”, “materials/models/player/roflplayer”}
playermodels[2] = {“models/player/lolplayer”, “materials/models/player/lolplayer”}
local Rand = math.random(1, #(self.playermodels))
Mdl = self.playermodels[Rand] --Use First Argument
Mtrl = self.playermodels[Rand] --Use Second Argument
pl:SetModel(Mdl)
pl:SetMaterial(Mtrl)
end[/lua]
I don’t know how to use args correctly for this type of thing.
E: For further concerns, I know I’m not adding any hooks in this as that’s not my problem.
Any help would be appreciated,
Bastinka