• Setting a playermodel to Admin Only
    3 replies, posted
Set a playermodel to Admin Only?? Any suggestions?? [lua] PLAYERMODEL.AdminOnly = true;[/lua] ?
A model can't be inherently admin only, far as I know. You can override a player's model with the PlayerSetModel hook.
Anyone know how im interested in this too.
[lua]function AdminPlayermodel(ply) local model = "models/player/odessa.mdl" -- Change this to the admin-only model local fallback = "models/player/monk.mdl" -- Change this to the model that will be set if somebody tries to use an admin-only model if ply:IsAdmin() then return end if ply:GetModel() == model then ply:SetModel(fallback) end hook.Add( "PlayerSetModel", "adminplayermodel", AdminPlayermodel) [/lua]
Sorry, you need to Log In to post a reply to this thread.