Hi Guys,
I'm having a small issue here. I'm currently scripting up a VIP donation system with ulx as the admin mod. When I do the check for just a normal user/default user It returns true for vip's for example
[CODE]local function IsVIP( Player )
return Player:IsUserGroup("VIP")
end
local function IsUser( Player )
return Player:IsUserGroup("user")
end[/CODE]
VIP would return true for both I need some help to stop that and make vip only return true for IsVIP
Thank you for your support.
If someone is a member of both User and VIP then no wonder User and VIP returns true.
Yes I understand why it does it. I want to know a work around. For returning true only if they user is default not any higher rank.
I really don't see what you're driving at with this thread. I don't see the issue here. In ULX you can only make a person part of one group, not two.
You should be able to do:
[code]
if ply:GetUserGroup() == "VIP" then
--code
end
[/code]
Why not check if IsVIP is false? Depending on how your groups are set up, if you are not a "VIP" the person will probably be a user.
-snip-
[LUA]local function IsVIP( Player )
return Player:IsUserGroup("VIP")
end
local function IsUser( Player )
return (Player:IsUserGroup("user") and not Player:IsUserGroup("VIP"))
end
[/LUA]
i'm not brilliant at coding but i think thats correct, that would do a check to see if the player is a user and not a vip then return true if both of those conditions are correct. if one is not true then the whole thing returns false
Hello guys,
I added a donator job on my server, it works perfectly.
But I would like that users are able to see the donator job in the F4 menu without taking it because with my code only members of donator group can see the job.
Here is my code :
[CODE]TEAM_JUMPER = AddExtraTeam("Ninja", Color(0,200,200,200), "models/player/slow/jamis/moon_knight/slow_v2.mdl", [[Job donator.]],
{"grapplehook", "weapon_crowbar"}, "Ninja", 2, 65, 0, false, true, nil, function(ply) return ply:CheckGroup("donator") or ply:IsAdmin() end)[/CODE]
I don't understand why they cannot see the job as users, because it's the same code I have added on a special donator printer and users can see it without taking it.
Any ideas ?, thanks in advance.
[QUOTE=mumuk;40242725]Hello guys,
I added a donator job on my server, it works perfectly.
But I would like that users are able to see the donator job in the F4 menu without taking it because with my code only members of donator group can see the job.
Here is my code :
[CODE]TEAM_JUMPER = AddExtraTeam("Ninja", Color(0,200,200,200), "models/player/slow/jamis/moon_knight/slow_v2.mdl", [[Job donator.]],
{"grapplehook", "weapon_crowbar"}, "Ninja", 2, 65, 0, false, true, nil, function(ply) return ply:CheckGroup("donator") or ply:IsAdmin() end)[/CODE]
I don't understand why they cannot see the job as users, because it's the same code I have added on a special donator printer and users can see it without taking it.
Any ideas ?, thanks in advance.[/QUOTE]
Maybe make your own thread...?
Sorry, you need to Log In to post a reply to this thread.