heey, this works if you're an admin
but i've added a couple of custom ranks to my server, for example Donator.
I tried changing the Admin to Donator, but it only gave script errors, can someone help me?
function MapVote.HasExtraVotePower(ply)
-- Example that gives admins more voting power
if ply:IsAdmin() then
return true
end
return false
end
Player/IsUserGroup
Sorry im pretty new to coding, what do i need to replacr with my current code with what you just send?
Do you use ULX?
If yes you would have to use a table like this:
function MapVote.HasExtraVotePower(ply)
if table.HasValue({"superadmin", "teamleitung", "admin", "moderator"}, ply:GetNWString("usergroup")) then
-- your code
end
function MapVote.HasExtraVotePower(ply)-- Example that gives admins more voting power
if LocalPlayer():IsUserGroup("noaccess") then
return true
end
return false
end
Ty so so much!!!, this did it!
I want to thank everyone in this thread for helping me.
You guys are something else!
P.S. For anyone who is interested, I'm making a gmod TTT server with an awesome community.
change LocalPlayer() to ply.
Ye
Yeah I found that out myself (after like 30 minutes pfft). But thanks so much!! It works perfect now!
Sorry, you need to Log In to post a reply to this thread.