PDA

View Full Version : Cerere plugin /who



gabrielul
14-07-16, 01:35
Salut , imi puteti face careva un /who ?
Multumesc. Aici sunt accesele si gradele..
"Detinator",
"Owner",
"Co-Owner",
"God",
"Semi-God",
"Global-Moderator",
"Moderator",
"Administrator",
"Helper",
"Slot"

"abcdefghijklmnopqrstu",
"abcdefhijknopqrst",
"bcdefhijknopqrt",
"bcdefijknopqrs",
"bcdefijnopqrt",
"bcdefijnopqr",
"bcdefijnop",
"bcefijn",
"bcefij",
"b"

Syncron got his gun
14-07-16, 07:18
Cum vrei sa apara in consola , meniu. motd ( cum e pe jb ) ?

gabrielul
14-07-16, 10:37
Da , ori cum e bine . Stiu ca sunt 4 feluri .. Ajunge daca merge doar 1 ca nu am nevoie de mai multe.

KrAzZzY
14-07-16, 10:42
/who motd => ca si pe jb ....



#include <amxmodx>
#include <amxmisc>

#define PLUGIN "ULTIMATE WHO"
#define VERSION "1.1"
#define AUTHOR "P.Of.Pw"

#define CharsMax(%1) sizeof %1 - 1
#define time_shower 1.0

#define GROUPS_NAME 10
#define GROUPS_ACCESS 10

#define motd_msg "Admin's Online"

new color[][] =
{
"00FF00",
"FF0000",
"0000FF",
"545454"
}

new GroupNames[GROUPS_NAME][] =
{
"Detinator",
"Owner",
"Co-Owner",
"God",
"Semi-God",
"Global-Moderator",
"Moderator",
"Administrator",
"Helper",
"Slot"
}

new GroupFlags[GROUPS_ACCESS][] =
{
"abcdefghijklmnopqrstu",
"abcdefhijknopqrst",
"bcdefhijknopqrt",
"bcdefijknopqrs",
"bcdefijnopqrt",
"bcdefijnopqr",
"bcdefijnop",
"bcefijn",
"bcefij",
"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
}

/who hud => ca pe Go


#include <amxmodx>
#include <amxmisc>

#define PLUGIN "Who meniu"
#define VERSION "1.0"
#define AUTHOR "Askwrite"

#define GRUPURI 10
new const TITLU[] = " \y Admini\y[\wDNS.AlphaCS.Ro\y]";
new const IESIRE[] = "\yIesire, Apasa \r0 sau \r5^n";
new const NOADMINS[] = "\y Nu sunt admini online.";
#pragma semicolon 1

new g_NumeGrade[ GRUPURI ][ ] = {
"Detinator",
"Owner",
"Co-Owner",
"God",
"Semi-God",
"Global-Moderator",
"Moderator",
"Administrator",
"Helper",
"Slot"
};

new g_Flaguri[ GRUPURI ][ ] = {
"abcdefghijklmnopqrstu",
"abcdefhijknopqrst",
"bcdefhijknopqrt",
"bcdefijknopqrs",
"bcdefijnopqrt",
"bcdefijnopqr",
"bcdefijnop",
"bcefijn",
"bcefij",
"b"
};

new g_ValueFlaguri[ GRUPURI ];

public plugin_init( ) {

register_plugin( PLUGIN, VERSION, AUTHOR );
for( new i = 0 ; i < GRUPURI ; i++ )
g_ValueFlaguri[ i ] = read_flags( g_Flaguri[ i ] );

register_clcmd("say /who", "cmdWho");
register_clcmd("say_team /who", "cmdWho");
register_clcmd("say /admin", "cmdWho");
register_clcmd("say_team /admin", "cmdWho");
register_clcmd("say /admins", "cmdWho");
register_clcmd("say_team /admins", "cmdWho");
register_clcmd("say /admini", "cmdWho");
register_clcmd("say_team /admini", "cmdWho");


}

public cmdWho( id, page ) {

new MenuName[ 64 ], MenuExitKey[ 32 ];

formatex( MenuName, sizeof ( MenuName ) -1, "%s", TITLU );

formatex( MenuExitKey, sizeof ( MenuExitKey ) -1, "%s", IESIRE );

new menu = menu_create(MenuName, "InchidereMeniu");

if( AdminiON( ) )
{

for( new i = 0; i < GRUPURI; i++ )
{
AdaugareA( id, menu, i );
}
}
else
{
menu_additem( menu, NOADMINS , "1", 0 );
}

menu_setprop(menu, MPROP_EXITNAME, MenuExitKey );

menu_display(id, menu, page);

}


public InchidereMeniu(id, menu, item) {
if(item == MENU_EXIT)
{
menu_destroy( menu );
return 1;
}

new data[6], iName[64];
new iaccess, callback;

menu_item_getinfo(menu, item, iaccess, data,5, iName, 63, callback);

new key = str_to_num(data);

switch(key)
{
case 1,2,3,4,5,6,7:
{
menu_destroy( menu );
return 1;
}
}

return 0;
}

public AdaugareA( const id, const menu, const group ) {

new AdminMenuMessage[ 32 ][ 64 ],AdminMenuKey[ 32 ][ 32 ], MenuKey = 1;

static Players[ 32 ], Num, Player;
get_players( Players, Num, "ch" );

for( new x = 0 ; x < Num ; x++ )
{
Player = Players[ x ];
if( get_user_flags( Player ) == g_ValueFlaguri[ group ] )
{

formatex( AdminMenuMessage[ MenuKey ], sizeof ( AdminMenuMessage[ ] ) -1, "\y \w%s - \y\r| %s%s | ",
gName( Player ), g_NumeGrade[ group ], Player == id ? "\r *" : "" );

formatex( AdminMenuKey[ MenuKey ], sizeof ( AdminMenuKey[ ] ) -1, "%d", MenuKey );

MenuKey++;
}
}

for( new z = 1 ; z < MenuKey ; z++ )
{

menu_additem( menu, AdminMenuMessage[ z ], AdminMenuKey[ z ], 0 );
}

}

stock bool:AdminiON( ) {
new bool:AGasiti = false;

static Players[ 32 ], Num, Player;
get_players( Players, Num, "ch" );

for( new x = 0 ; x < Num ; x++ )
{
Player = Players[ x ];
for( new i = 0 ; i < GRUPURI ; i++ )
{
if( AGasiti ) break;
if( get_user_flags( Player ) == g_ValueFlaguri[ i ] )
{
AGasiti = true;
}
}
}

return AGasiti ? true : false;
}

stock gName( id ) {

new name[ 32 ];
get_user_name( id, name, sizeof ( name ) -1 );

return name;
}

gabrielul
14-07-16, 11:32
Mersi .
T/C va rog.
Daca ai putea ai mai face 1 plugin cu tag ? Adica sa pui tag ori ce . :)) Ca am cautat dar sunt buguite..

KrAzZzY
14-07-16, 12:10
exista deja pe internet un asemenea plugin nebuguit ...

http://i48.tinypic.com/a3o66u.png


Download : LINK CLICK (https://forums.alliedmods.net/showthread.php?t=183491)


tagurile le adaugi de aici ap_prefixes.ini

"n" "KrAzZzY" "BlaBla" => asa adaugi tag pe nume
"f" "a" "BlaBla" => asa adaugi tag pe flagul "a" sa spunem
"i" "193.999.999.99" "BlaBla" => asa adaugi tag pe ip
"s" "steam_id1231231231" "BlaBla" => asa adaugi tag pe steamid

gabrielul
14-07-16, 12:50
exista deja pe internet un asemenea plugin nebuguit ...

http://i48.tinypic.com/a3o66u.png


Download : LINK CLICK (https://forums.alliedmods.net/showthread.php?t=183491)


tagurile le adaugi de aici ap_prefixes.ini

"n" "KrAzZzY" "BlaBla" => asa adaugi tag pe nume
"f" "a" "BlaBla" => asa adaugi tag pe flagul "a" sa spunem
"i" "193.999.999.99" "BlaBla" => asa adaugi tag pe ip
"s" "steam_id1231231231" "BlaBla" => asa adaugi tag pe steamid
L-am bagat , merge perfect . Dar daca bag tag Fondator scire mai intai fara tag dupa cu tag . Adica de 2 ori
bLooD. : Salut
Fondator bLooD. : Salut

KrAzZzY
14-07-16, 14:23
scoate pluginurile ghostchat sau oricare care are legatura cu mesaje playerilor ...

gabrielul
14-07-16, 15:18
Nu am asa ceva.. Ai teamviewer ? Daca da imi dai pm si-ti dau datele sa bagi tu

Syncron got his gun
14-07-16, 19:03
exista deja pe internet un asemenea plugin nebuguit ...

http://i48.tinypic.com/a3o66u.png


Download : LINK CLICK (https://forums.alliedmods.net/showthread.php?t=183491)


tagurile le adaugi de aici ap_prefixes.ini

"n" "KrAzZzY" "BlaBla" => asa adaugi tag pe nume
"f" "a" "BlaBla" => asa adaugi tag pe flagul "a" sa spunem
"i" "193.999.999.99" "BlaBla" => asa adaugi tag pe ip
"s" "steam_id1231231231" "BlaBla" => asa adaugi tag pe steamid

Ai dreptate nu e buguit e foarte buguit.
Trebuie pus dupa orice fel de plugin de genu ghostchat.amxx sau allchat.amxx aceasta problema am rezolvat-o cand lucram eu la addons-ul de zm si eram " inebunit " dupa Tag.
Daca nu merge nici asa lasa reply,dar oricum iti fute tot chat-ul morti nu pot vedea ce scriu vii si tot asa sunt momente cand scri cu say_team si vede echipa advers.
Cat despre acel plugin de /who vad esti multumit sau mai vrei alta varianta?

gabrielul
14-07-16, 19:47
Cu tag-u am rezolvat , am sters colorchat si cu who-u nu poti face sa nu fie roz ? =)) e pt fete serios amu

KrAzZzY
15-07-16, 18:13
#include <amxmodx>
#include <amxmisc>

#define PLUGIN "ULTIMATE WHO"
#define VERSION "1.1"
#define AUTHOR "P.Of.Pw"

#define CharsMax(%1) sizeof %1 - 1
#define time_shower 1.0

#define GROUPS_NAME 10
#define GROUPS_ACCESS 10

#define motd_msg "Admin's Online"

new color[][] =
{
"00FF00",
"FF0000",
"0000FF",
"545454"
}

new GroupNames[GROUPS_NAME][] =
{
"Detinator",
"Owner",
"Co-Owner",
"God",
"Semi-God",
"Global-Moderator",
"Moderator",
"Administrator",
"Helper",
"Slot"
}

new GroupFlags[GROUPS_ACCESS][] =
{
"abcdefghijklmnopqrstu",
"abcdefhijknopqrst",
"bcdefhijknopqrt",
"bcdefijknopqrs",
"bcdefijnopqrt",
"bcdefijnopqr",
"bcdefijnop",
"bcefijn",
"bcefij",
"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=^"blue^">%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
}

acum e albastru

gabrielul
16-07-16, 17:09
Mersi.
T/C

KrAzZzY
17-07-16, 20:28
userul a dorit un altfel de /who ... nu i-am putut trimite mesaj in privat deoarece depaseam limita de caractere ... asa ca las sursa aici



#include <amxmodx>
#include <amxmisc>

#define PLUGIN "Who meniu"
#define VERSION "1.0"
#define AUTHOR "Askwrite"

#define GRUPURI 19
new const TITLU[] = " \y Admini\y[\wDNS.AlphaCS.Ro\y]";
new const IESIRE[] = "\yIesire, Apasa \r0 sau \r5^n";
new const NOADMINS[] = "\y Nu sunt admini online.";
#pragma semicolon 1

new g_NumeGrade[ GRUPURI ][ ] = {
"Detinator",
"Owner+VIP",
"Owner",
"Co-Owner+VIP",
"Co-Owner",
"God+VIP",
"God",
"Semi-God+VIP",
"Semi-God",
"Global-Moderator+VIP",
"Global-Moderator",
"Moderator+VIP",
"Moderator",
"Administrator+VIP",
"Administrator",
"Helper+VIP",
"Helper",
"V.I.P",
"Slot"
};

new g_Flaguri[ GRUPURI ][ ] = {
"abcdefghijklmnopqrstu",
"abcdefhijknopqrst",
"abcdefijknopqrst",
"bcdefhijknopqrt",
"bcdefijknopqrt",
"bcdefhijknopqr",
"bcdefijknopqr",
"bcdefhijnopqrt",
"bcdefijnopqrt",
"bcdefhijnopqr",
"bcdefijnopqr",
"bcdefhijnop",
"bcdefijnop",
"bcefhijn",
"bcefijn",
"bcefhij",
"bcefij",
"be",
"b"
};

new g_ValueFlaguri[ GRUPURI ];

public plugin_init( ) {

register_plugin( PLUGIN, VERSION, AUTHOR );
for( new i = 0 ; i < GRUPURI ; i++ )
g_ValueFlaguri[ i ] = read_flags( g_Flaguri[ i ] );

register_clcmd("say /who", "cmdWho");
register_clcmd("say_team /who", "cmdWho");
register_clcmd("say /admin", "cmdWho");
register_clcmd("say_team /admin", "cmdWho");
register_clcmd("say /admins", "cmdWho");
register_clcmd("say_team /admins", "cmdWho");
register_clcmd("say /admini", "cmdWho");
register_clcmd("say_team /admini", "cmdWho");


}

public cmdWho( id, page ) {

new MenuName[ 64 ], MenuExitKey[ 32 ];

formatex( MenuName, sizeof ( MenuName ) -1, "%s", TITLU );

formatex( MenuExitKey, sizeof ( MenuExitKey ) -1, "%s", IESIRE );

new menu = menu_create(MenuName, "InchidereMeniu");

if( AdminiON( ) )
{

for( new i = 0; i < GRUPURI; i++ )
{
AdaugareA( id, menu, i );
}
}
else
{
menu_additem( menu, NOADMINS , "1", 0 );
}

menu_setprop(menu, MPROP_EXITNAME, MenuExitKey );

menu_display(id, menu, page);

}


public InchidereMeniu(id, menu, item) {
if(item == MENU_EXIT)
{
menu_destroy( menu );
return 1;
}

new data[6], iName[64];
new iaccess, callback;

menu_item_getinfo(menu, item, iaccess, data,5, iName, 63, callback);

new key = str_to_num(data);

switch(key)
{
case 1,2,3,4,5,6,7:
{
menu_destroy( menu );
return 1;
}
}

return 0;
}

public AdaugareA( const id, const menu, const group ) {

new AdminMenuMessage[ 32 ][ 64 ],AdminMenuKey[ 32 ][ 32 ], MenuKey = 1;

static Players[ 32 ], Num, Player;
get_players( Players, Num, "ch" );

for( new x = 0 ; x < Num ; x++ )
{
Player = Players[ x ];
if( get_user_flags( Player ) == g_ValueFlaguri[ group ] )
{

formatex( AdminMenuMessage[ MenuKey ], sizeof ( AdminMenuMessage[ ] ) -1, "\y \w%s - \y\r| %s%s | ",
gName( Player ), g_NumeGrade[ group ], Player == id ? "\r *" : "" );

formatex( AdminMenuKey[ MenuKey ], sizeof ( AdminMenuKey[ ] ) -1, "%d", MenuKey );

MenuKey++;
}
}

for( new z = 1 ; z < MenuKey ; z++ )
{

menu_additem( menu, AdminMenuMessage[ z ], AdminMenuKey[ z ], 0 );
}

}

stock bool:AdminiON( ) {
new bool:AGasiti = false;

static Players[ 32 ], Num, Player;
get_players( Players, Num, "ch" );

for( new x = 0 ; x < Num ; x++ )
{
Player = Players[ x ];
for( new i = 0 ; i < GRUPURI ; i++ )
{
if( AGasiti ) break;
if( get_user_flags( Player ) == g_ValueFlaguri[ i ] )
{
AGasiti = true;
}
}
}

return AGasiti ? true : false;
}

stock gName( id ) {

new name[ 32 ];
get_user_name( id, name, sizeof ( name ) -1 );

return name;
}

gabrielul
17-07-16, 20:39
userul a dorit un altfel de /who ... nu i-am putut trimite mesaj in privat deoarece depaseam limita de caractere ... asa ca las sursa aici



#include <amxmodx>
#include <amxmisc>

#define PLUGIN "Who meniu"
#define VERSION "1.0"
#define AUTHOR "Askwrite"

#define GRUPURI 19
new const TITLU[] = " \y Admini\y[\wDNS.AlphaCS.Ro\y]";
new const IESIRE[] = "\yIesire, Apasa \r0 sau \r5^n";
new const NOADMINS[] = "\y Nu sunt admini online.";
#pragma semicolon 1

new g_NumeGrade[ GRUPURI ][ ] = {
"Detinator",
"Owner+VIP",
"Owner",
"Co-Owner+VIP",
"Co-Owner",
"God+VIP",
"God",
"Semi-God+VIP",
"Semi-God",
"Global-Moderator+VIP",
"Global-Moderator",
"Moderator+VIP",
"Moderator",
"Administrator+VIP",
"Administrator",
"Helper+VIP",
"Helper",
"V.I.P",
"Slot"
};

new g_Flaguri[ GRUPURI ][ ] = {
"abcdefghijklmnopqrstu",
"abcdefhijknopqrst",
"abcdefijknopqrst",
"bcdefhijknopqrt",
"bcdefijknopqrt",
"bcdefhijknopqr",
"bcdefijknopqr",
"bcdefhijnopqrt",
"bcdefijnopqrt",
"bcdefhijnopqr",
"bcdefijnopqr",
"bcdefhijnop",
"bcdefijnop",
"bcefhijn",
"bcefijn",
"bcefhij",
"bcefij",
"be",
"b"
};

new g_ValueFlaguri[ GRUPURI ];

public plugin_init( ) {

register_plugin( PLUGIN, VERSION, AUTHOR );
for( new i = 0 ; i < GRUPURI ; i++ )
g_ValueFlaguri[ i ] = read_flags( g_Flaguri[ i ] );

register_clcmd("say /who", "cmdWho");
register_clcmd("say_team /who", "cmdWho");
register_clcmd("say /admin", "cmdWho");
register_clcmd("say_team /admin", "cmdWho");
register_clcmd("say /admins", "cmdWho");
register_clcmd("say_team /admins", "cmdWho");
register_clcmd("say /admini", "cmdWho");
register_clcmd("say_team /admini", "cmdWho");


}

public cmdWho( id, page ) {

new MenuName[ 64 ], MenuExitKey[ 32 ];

formatex( MenuName, sizeof ( MenuName ) -1, "%s", TITLU );

formatex( MenuExitKey, sizeof ( MenuExitKey ) -1, "%s", IESIRE );

new menu = menu_create(MenuName, "InchidereMeniu");

if( AdminiON( ) )
{

for( new i = 0; i < GRUPURI; i++ )
{
AdaugareA( id, menu, i );
}
}
else
{
menu_additem( menu, NOADMINS , "1", 0 );
}

menu_setprop(menu, MPROP_EXITNAME, MenuExitKey );

menu_display(id, menu, page);

}


public InchidereMeniu(id, menu, item) {
if(item == MENU_EXIT)
{
menu_destroy( menu );
return 1;
}

new data[6], iName[64];
new iaccess, callback;

menu_item_getinfo(menu, item, iaccess, data,5, iName, 63, callback);

new key = str_to_num(data);

switch(key)
{
case 1,2,3,4,5,6,7:
{
menu_destroy( menu );
return 1;
}
}

return 0;
}

public AdaugareA( const id, const menu, const group ) {

new AdminMenuMessage[ 32 ][ 64 ],AdminMenuKey[ 32 ][ 32 ], MenuKey = 1;

static Players[ 32 ], Num, Player;
get_players( Players, Num, "ch" );

for( new x = 0 ; x < Num ; x++ )
{
Player = Players[ x ];
if( get_user_flags( Player ) == g_ValueFlaguri[ group ] )
{

formatex( AdminMenuMessage[ MenuKey ], sizeof ( AdminMenuMessage[ ] ) -1, "\y \w%s - \y\r| %s%s | ",
gName( Player ), g_NumeGrade[ group ], Player == id ? "\r *" : "" );

formatex( AdminMenuKey[ MenuKey ], sizeof ( AdminMenuKey[ ] ) -1, "%d", MenuKey );

MenuKey++;
}
}

for( new z = 1 ; z < MenuKey ; z++ )
{

menu_additem( menu, AdminMenuMessage[ z ], AdminMenuKey[ z ], 0 );
}

}

stock bool:AdminiON( ) {
new bool:AGasiti = false;

static Players[ 32 ], Num, Player;
get_players( Players, Num, "ch" );

for( new x = 0 ; x < Num ; x++ )
{
Player = Players[ x ];
for( new i = 0 ; i < GRUPURI ; i++ )
{
if( AGasiti ) break;
if( get_user_flags( Player ) == g_ValueFlaguri[ i ] )
{
AGasiti = true;
}
}
}

return AGasiti ? true : false;
}

stock gName( id ) {

new name[ 32 ];
get_user_name( id, name, sizeof ( name ) -1 );

return name;
}

Mersi mult ..

George.
21-07-16, 06:59
#include <amxmodx>
#include <amxmisc>

#define PLUGIN "ULTIMATE WHO"
#define VERSION "1.1"
#define AUTHOR "P.Of.Pw"

#define CharsMax(%1) sizeof %1 - 1
#define time_shower 1.0

#define GROUPS_NAME 10
#define GROUPS_ACCESS 10

#define motd_msg "Admin's Online"

new color[][] =
{
"00FF00",
"FF0000",
"0000FF",
"545454"
}

new GroupNames[GROUPS_NAME][] ={
"Detinator",
"Owner",
"Co-Owner",
"God",
"Semi-God",
"Global-Moderator",
"Moderator",
"Administrator",
"Helper",
"Slot"
};

new GroupFlags[GROUPS_ACCESS][] ={
"abcdefghijklmnopqrstu",
"abcdefhijknopqrst",
"bcdefhijknopqrt",
"bcdefijknopqrs",
"bcdefijnopqrt",
"bcdefijnopqr",
"bcdefijnop",
"bcefijn",
"bcefij",
"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
}
e pluginu folosit de mine pe toate sv el e deja in motd
T/c