local t = {
"models/player/alyx.mdl",
"models/player/breen.mdl",
"models/player/barney.mdl",
"models/player/eli.mdl",
"models/player/gman_high.mdl",
"models/player/kleiner.mdl",
"models/player/monk.mdl",
"models/player/odessa.mdl",
"models/player/magnusson.mdl"
}
function ulx.model( calling_ply, target_plys, model )
for k, v in next, target_plys do
if ( !v:Alive() ) then
ULib.tsayError( calling_ply, v:Nick() .. " is dead", true )
else
v:SetModel( model )
end
end
ulx.fancyLogAdmin( calling_ply, true, "#A changed the model for #T", target_plys, model )
end
local model = ulx.command( "Fun", "ulx model", ulx.model, "!model" )
model:addParam{ type=ULib.cmds.PlayersArg }
model:addParam{ type=ULib.cmds.StringArg, hint="model", completes=t, ULib.restrictToCompletes }
model:defaultAccess( ULib.ACCESS_ADMIN )
model:help( "Sets your model." )