• If player is member of steam group then
    5 replies, posted
Hey guys. I'm adding an addition to a gamemode that will add money to a players account if they are a member of a certain steam group. Could someone possibly help me out? I think this is the correct forum, since it would use web elements. Thanks!!
i'll do it for $50, PM me
I'm looking for guidance, not a person to do it for me.
It wouldn't use website elements. I've been out of the Garry's Mod LUA game for a while, but I believe that there is a Steam Community API for LUA developers to check things like what you want. Either way, you'll probably get a lot more response/help in the LUA forums since this is essentially a LUA/gamemode question.
[QUOTE=TheBigS;34192786]Either way, you'll probably get a lot more response/help in the LUA forums since this is essentially a LUA/gamemode question.[/QUOTE] Will do. Mods: please close thread.
Wait, don't close, I have a solution. You'll need an XML parser for this. First, open your group's page in a browser. Hover your cursor over "Enter chat room" link and look at the status bar. Remember the big number starting with 10. In your PlayerInitialSpawn hook, do the following steps (assuming that the player is called "ply" in function arguments). 1) Open the following URL as XML file: [lua]"http://steamcommunity.com/profiles/[U:1:"..tostring(tonumber(String.sub(ply:SteamID(),9,10))+tonumber(String.sub(ply:SteamID(),11))*2).."]?xml=1"[/lua] 3) Loop through every "group" element in profile>groups element. Compare groupID64 tag value to the group ID you remembered before (though both things are numbers, they must be compared [B]as strings[/B], because they may be larger than the limit of floating-point numbers). If they are the same, the player is in your group.
Sorry, you need to Log In to post a reply to this thread.