Need help with setting player models based off of ULX groups
4 replies, posted
What LUA script will check if a player is an admin and set there player model to one specified? The server is a TTT server.
[lua]if ply:IsUserGroup("donator") then
ply:SetModel("models/alyx.mdl")
end[/lua]
or you can use ply:IsAdmin() etc.
Hopefully this isn't too much of a bump, but I want to do something for one of my superadmins.
[QUOTE]
if ply:IsUserGroup("wolfy") then
ply:SetModel("models/wolf.mdl")
end
[/QUOTE]
Where would this go?
[QUOTE=NDKilla;39703287]Hopefully this isn't too much of a bump, but I want to do something for one of my superadmins.
Where would this go?[/QUOTE]
[lua]hook.Add("Think","setPlyModels",function()
for _,ply in pairs(player.GetAll()) do
if ply:IsUserGroup("Admin") then
ply:SetModel("models/player/mossman.mdl")
end
end
end)[/lua]
typed on a phone. tell me if this works...
Okay sorry I'm really bad with lua I just made a few custom weapons for my TTT Server, and I think I understand what the code there does, but what file does that go in? o: like, any gamemode lua file or... i really have no idea o:
edit : thanks for trying to help me
Sorry, you need to Log In to post a reply to this thread.