Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <amxmodx>
- #include <amxmisc>
- #define PLUGIN "Who"
- #define VERSION "1.0"
- #define AUTHOR "Codrin Bradea SATANA:"
- #define CharsMax(%1) sizeof %1 - 1
- #define MAX_GROUPS 4
- new g_groupNames[MAX_GROUPS][] = {
- "Helper Level[1]",
- "Helper Level[2]",
- "Helper Level[3]",
- "Helper Level[4]"
- }
- new g_groupFlags[MAX_GROUPS][] = {
- "cefj",
- "bcef",
- "bcdefgh",
- "bcdefghij"
- }
- new g_groupFlagsValue[MAX_GROUPS];
- public plugin_init() {
- register_plugin(PLUGIN, VERSION, AUTHOR);
- for(new i = 0; i < MAX_GROUPS; i++)
- g_groupFlagsValue[i] = read_flags(g_groupFlags[i]);
- register_clcmd("admin_who", "cmdWho", -1, "");
- register_clcmd("say /helpers", "cmdWho", -1, "");
- register_clcmd("say /helpers", "cmdWho", -1, "");
- register_clcmd("say /helpers", "cmdWho", -1, "");
- register_clcmd("say staff", "cmdWho", -1, "");
- register_clcmd("say staff", "cmdWho", -1, "");
- register_clcmd("say /staff", "cmdWho", -1, "");
- register_clcmd("say helpers", "cmdWho", -1, "");
- }
- public cmdWho(id)
- {
- static sPlayers[32], iNum, iPlayer;
- static sName[32], sBuffer[1024];
- static iLen;
- iLen = formatex(sBuffer, sizeof sBuffer - 1, "<body bgcolor=#000000><font color=#7b68ee><pre>");
- iLen += formatex(sBuffer[iLen], CharsMax(sBuffer) - iLen,"<center><h2><font color=^"yellow^"><B>[=Helperi Online=]</B></font></h2></center>^n^n");
- get_players(sPlayers, iNum, "ch");
- for(new i = 0; i < MAX_GROUPS; i++)
- {
- iLen += formatex(sBuffer[iLen], CharsMax(sBuffer) - iLen, "<center><h5><font color=^"green^">..::<B>%s</B>::..^n</font></h5></center>", g_groupNames[i]);
- for(new x = 0; x < iNum; x++)
- {
- iPlayer = sPlayers[x];
- if(get_user_flags(iPlayer) == g_groupFlagsValue[i])
- {
- get_user_name(iPlayer, sName, sizeof sName - 1);
- iLen += formatex(sBuffer[iLen], CharsMax(sBuffer) - iLen, "<center>%s^n</center>", sName);
- }
- }
- }
- show_motd(id, sBuffer, " # Helperi # Online #");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment