#Angel*CrY# Premium Member
Mesaje : 83 Puncte : 167 Reputatie : 6 Data de inscriere : 06/04/2012 Varsta : 24 Localizare : Targoviste
| Subiect: Amx_Who By #Angel*CrY# Vin Apr 06, 2012 11:54 am | |
| M-am gandit ca ar fi bine sa v-a dau si voua un Ultimate Who facut personal de mine ... Sper sa va placa : - Cod:
-
#include <amxmodx> #include <amxmisc> #include <amxmodx> #include <amxmisc>
#define PLUGIN "ULTIMATE WHO" #define VERSION "1.1" #define AUTHOR "AngelCry"
#define CharsMax(%1) sizeof %1 - 1 #define time_shower 1.0
#define GROUPS_NAME 8 #define GROUPS_ACCESS 8
#define motd_msg "Admin's Server"
new color[][] = { "00FF00", "FF0000", "0000FF", "545454" }
new GroupNames[GROUPS_NAME][] = { "==Creatorul-Serverului==", "==Lider Of AdminS==", "==Owner==", "==GodS==", "==Moderator==", "==Administrator==", "==Helper==", "==Slot==" }
new GroupFlags[GROUPS_ACCESS][] = { "abcdefghijklmnopqrstu", "abcdefghijklmnopqrst", "abcdefgijlmnopq", "abcdefgijlmno", "bcdefgijmnop", "bcdefgijm", "bcefijm", "b" }
new GroupFlagsValue[GROUPS_NAME]
public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) for(new p_of_pw = 0 ; p_of_pw < GROUPS_NAME ; p_of_pw++) GroupFlagsValue[p_of_pw] = read_flags(GroupFlags[p_of_pw]) register_clcmd("say", "cmdSay") register_clcmd("say_team", "cmdSay") }
public cmdSay(id) { new say[8] read_args(say, 7) if ((containi(say, "who") != -1 || containi(say, "admin") != -1 || containi(say, "admins") != -1 || contain(say, "/who") != -1 || contain(say, "/admin") != -1 || contain(say, "/admins") != -1)) who_motd(id) return PLUGIN_CONTINUE }
who_motd(id) { new sPlayers[32], iNum, iPlayer new sName[32], sBuffer[1024] new iLen iLen = formatex(sBuffer, sizeof sBuffer - 1, "<body bgcolor=#000000><font color=#7b68ee><pre>") get_players(sPlayers, iNum, "ch") for(new p_of_pw = 0; p_of_pw < GROUPS_NAME ; p_of_pw++) { iLen += formatex(sBuffer[iLen], CharsMax(sBuffer) - iLen, "<center><h5><font color=^"violet^">%s^n</font></h5></center>", GroupNames[p_of_pw]) for(new a = 0; a < iNum ; a++) { iPlayer = sPlayers[a] if(get_user_flags(iPlayer) == GroupFlagsValue[p_of_pw]) { get_user_name(iPlayer, sName, sizeof sName - 1) iLen += formatex(sBuffer[iLen], CharsMax(sBuffer) - iLen, "<center><font color=^"%s^">%s^n</center></font>", color[p_of_pw], sName) } } } show_motd(id, sBuffer, motd_msg) return PLUGIN_CONTINUE } | |
|
GmCs|L!v!u Administrator
Mesaje : 76 Puncte : 192 Reputatie : 2 Data de inscriere : 29/03/2012 Varsta : 26 Localizare : Ploiesti
| |