General > Developers Corner

ply:isUserGroup advice

<< < (5/5)

Bite That Apple:
According to the gmod wiki, (I have no clue what player_connect is either but..) data.networkid is not steamid, but unique ID. I could be completely wrong, I think I have seen Garry call it a unique id to be steam id before in the past.

Aaron113:

--- Quote from: Bite That Apple on May 19, 2015, 08:38:15 AM ---According to the gmod wiki, (I have no clue what player_connect is either but..) data.networkid is not steamid, but unique ID. So, not sure how you're getting that to work as a Steam ID.

--- End quote ---
I don't think so, it worked just fine in the last version I gave.  I guess I would have to double check, but I'm pretty confident that it is steamid seeing as it worked.

Bite That Apple:

--- Quote from: Aaron113 on May 19, 2015, 08:40:46 AM ---I don't think so, it worked just fine in the last version I gave.  I guess I would have to double check, but I'm pretty confident that it is steamid seeing as it worked.

--- End quote ---

Yeah, I think I had made a mistake. I didn't finish reading the wiki.

Local steamid = data.networkid // Same as Player: Unique ID ()
Local id = data.userid // Same as Player: UserID ()


- - -

With that in mind though, what function in ulib allows ulib to search in the users.txt for if a player exists in it, and then grab the group data, if that's possible? Because if what I'm thinking is possible, I could fix my player joined announcement script to actually show colour for players who are connected.

Aaron113:

--- Quote from: Bite That Apple on May 19, 2015, 08:44:34 AM ---With that in mind though, what function in ulib allows ulib to search in the users.txt for if a player exists in it, and then grab the group data, if that's possible? Because if what I'm thinking is possible, I could fix my player joined announcement script to actually show colour for players who are connected.

--- End quote ---
MrPresident recently added this to ULib.  I believe you could possibly fetch uteam's colors for groups after that.

EDIT:  Keep in mind that my code on first post of page will error if the user doesn't exist.  I figured whoever uses it can figure that out.

Bite That Apple:

--- Quote from: Aaron113 on May 19, 2015, 09:20:23 AM ---MrPresident recently added this to ULib.  I believe you could possibly fetch uteam's colors for groups after that.

EDIT:  Keep in mind that my code on first post of page will error if the user doesn't exist.  I figured whoever uses it can figure that out.

--- End quote ---

Alright, thanks. I'll check it out and see if I can get something to get working. I'll post on my own favorite thread (Questions, Questions, Questions! thread) if I have any issues.

Navigation

[0] Message Index

[*] Previous page

Go to full version