Last active
December 16, 2015 20:29
-
-
Save webdestroya/5492706 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <sourcemod> | |
public Plugin:myinfo = | |
{ | |
name = "killjoy", | |
author = "WebDestroya", | |
description = "Does something for killjoy", | |
version = "1.0", | |
url = "http://www.mitchdb.com/" | |
}; | |
public OnPluginStart() { | |
RegConsoleCmd("sm_check", Command_Check, "Checks if you are a member or not"); | |
} | |
public Action:Command_Check(client, args) { | |
// find the adminID of the calling user | |
new AdminId:adminId = GetUserAdmin(client); | |
// they arent even an admin, so they wont have the flag anyway | |
if(adminId == INVALID_ADMIN_ID) { | |
PrintToConsole(client, "You are not a member"); | |
return Plugin_Handled; | |
} | |
// check to see if they have the flag | |
if(GetAdminFlag(adminId, AdminFlag:Admin_Custom6)) { | |
PrintToConsole(client, "You are a member"); | |
} else { | |
PrintToConsole(client, "You are not a member"); | |
} | |
// finished | |
return Plugin_Handled; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment