Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public int SteamWorks_OnClientGroupStatus(int authid, int groupid, bool isMember, bool isOfficer)
- {
- int client = GetUserFromAuthID(authid);
- if (client == -1)
- {
- return -1;
- }
- if(isMember || isOfficer)
- {
- b_InGroup[client] = true;
- return 1;
- }
- return -1;
- }
- public int GetUserFromAuthID(int authid)
- {
- for (int i = 1; i <= MaxClients; i++)
- {
- if(IsClientInGame(i)) {
- char charauth[64];
- GetClientAuthId(i, AuthId_Steam3, charauth, sizeof(charauth));
- char charauth2[64];
- IntToString(authid, charauth2, sizeof(charauth2));
- if(StrContains(charauth, charauth2, false) > -1)
- {
- return i;
- }
- }
- }
- return -1;
- }
- public Action Cmd_CheckGroup(int client, int args)
- {
- if(!IsClientInGame(client))
- return Plugin_Handled;
- if (IsClientJoinedGroup(client))
- {
- PrintToChat(client, " \x10[\x09pŠ\x10] \x05You are a community member!!");
- }
- else {
- PrintToChat(client, " \x10[\x09pŠ\x10] \x05You are not a community member.");
- }
- return Plugin_Handled;
- }
- bool IsClientJoinedGroup(int client) {
- if(b_InGroup[client])
- return true;
- return false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement