Steam Group Rewards - When you join you get a Member rank
20 replies, posted
Alright so with Steam Group Rewards you have the option to add in your own custom reward and I want it so you get the Member Rank for joining the steam group.
So on the config of steam rewards it says this towards custom rewards as an example.
[QUOTE]REWARDS.Settings.CustomRewardFunction = function(ply) ply:SetHealth(500) ply:Give("weapon_rpg") end[/QUOTE]
I am using ULX and I want to make it so it puts them into the Member rank.
So lets say it does.
What I am asking for you to do is make it so it sets them to Member, you don't need to add in an automated system or anything just simply make it so it sets them to the rank.
Thanks, any help is appreciated.
Is this the steam group rewards on Coderhire? or a free one?
He's using the exact same name [URL="http://coderhire.com/browse/script/434/steam-group-rewards"]as the one on Coderhire[/URL], so probably the one from Coderhire.
It's from Coderhire. I've added it to the server, the code zerothefallen put and well, nothing has happened so far. Do I have to restart the server, usually it works with just the map change.
Whats the group's name? It should work, assuming the player is in the server at the time. If your "member" group is called "member", that should work...
It's called "member" without the quotations. Do you think I have to restart or all the new people who join my group get the title?
the quotes are necessary because it's a string. That will add people to the group "member" if they're not the server.
too lazy to figure out how the add-on works
[QUOTE=zerothefallen;43354220]the quotes are necessary because it's a string. That will add people to the group "member" if they're not the server.
too lazy to figure out how the add-on works[/QUOTE]
So I have to make a group with the quotations?
No, the command works, I know it does.
The point is, is that when does it use that? The func is called when?
"ulx adduser name group" will add the player, in the server at the moment, to the group.
If the user isnt in the server when this function is called, it won't give it to them.
Well it isn't working for me. I didn't mean remove all the quotations from the code, I meant remove it from the group name.
Don't do that, or modify the line you were spoonfed, it's given to you like that for a reason.
[lua]
REWARDS.Settings.CustomRewardFunction = function(ply) ulx.adduserid(Entity(0), ply:SteamID(), "member") end
[/lua]
Would work better in this case, because players can have weird names, spaces or symbols that lua dislikes.
[CODE]REWARDS.Settings.CustomRewardFunction = function(ply) ulx.adduserid(Entity(0), ply:SteamID(), "member") end[/CODE]
Why doesn't this work this should be fine
[QUOTE=sm69baller;43356249]I have the coderhire script but i can't give you srry
[I][U][B]Edit : [/B][/U][/I] They have a certain copyright , I bought them but i'm not able to give them to someone else[/QUOTE]
They aren't asking for the script..
Sorry for reviving this dead thread I need some information.
[CODE]REWARDS.Settings.CustomRewardFunction = function(ply) ulx.adduserid(Entity(0), ply:SteamID(), "member") end[/CODE]
This worked, but it forced all the current users in superadmin ranks and all ranks below who were apart of the steam community to be forced into the custom rank that was added in.
Is there a way we can fix it so it doesn't affect players already on the steam group that have other user groups.
[QUOTE=jonbravo;44397189]Sorry for reviving this dead thread I need some information.
[CODE]REWARDS.Settings.CustomRewardFunction = function(ply) ulx.adduserid(Entity(0), ply:SteamID(), "member") end[/CODE]
This worked, but it forced all the current users in superadmin ranks and all ranks below who were apart of the steam community to be forced into the custom rank that was added in.
Is there a way we can fix it so it doesn't affect players already on the steam group that have other user groups.[/QUOTE]
[lua]REWARDS.Settings.CustomRewardFunction = function(ply) if ply:IsUserGroup("user") then ulx.adduser( ply, ply, "member" ) end end[/lua]
This is what I use. If they're in the group "user" which is my default group, then it promotes them to member when they join the group.
Dude you are a saint, but does this affect any other user groups?
No, it only affects players that are in the group "user".
So if a user in the group "moderator" joins the steam group after it syncs they will not receive the member group?
I'm just trying to clear that up before I install that line of text in.
yes, only people in the "user" group will go to "member" group, you can also add a !ply.IsUserGroup("admin") || !ply.IsUserGroup("moderator") check to confirm they are not admin, morderator or whatever group you put if you really want to, but it is not necessary at all.
Alright you all have been most helpful, this has worked and I'm glad to offer players rewards for joining thanks.
Sorry, you need to Log In to post a reply to this thread.