[REZOLVAT] [Cerere] /who

In acest subforum puteţi cere un plugin pentru server .
Locked
User avatar
TNT * Killx
Membru
Membru
Posts: 334
Joined: 7 years ago
Location: DE(GE) - RO
Has thanked: 0
Been thanked: 0
Zodiac:
Age: 18
Contact:
Status: Offline

7 years ago

Plugin cerut :/who | /admin | amx_who in consola
Serverul pentru care doresc pluginul : PUB.CSGAMERS.RO
Alte detalii tehnice despre plugin : Pai as dorii sa am /who pentru a vedea adminii !+tutorial cum se pune.
Grade :
Creatorul-Serverului - abcdefghijklmnopqrstu
Leader Of Admin's - abcdefghijklmnopqrst
Owner - bcdefghijlmnopqrs
GoodS - bcdefghijlmnopqr
Semi-GodS - bcdefgijlmnopq
Super-Moderator - bcdefgijmnop
Admin - bcdefgijmn
Helper - bcefijmn
V.I.P - ab
Slot - b
Last edited by TNT * Killx 7 years ago, edited 2 times in total.
User avatar
Aneimar
Fondator
Fondator
Posts: 1901
Joined: 8 years ago
Location: RO - DE
Has thanked: 0
Been thanked: 11 times
Zodiac:
Age: 28
Contact:
Status: Offline
Romania

7 years ago

Incearca .
#include <amxmodx>
#include <amxmisc>

#define PLUGIN "Who meniu"
#define VERSION "1.0"
#define AUTHOR "A.C"

#define GRUPURI 10
new const TITLU[] = " \w Nume admin \r | \w Grad ";
new const IESIRE[] = "\yIesire.^n";
new const NOADMINS[] = "\y Nu sunt admini online.";
#pragma semicolon 1

new g_NumeGrade[ GRUPURI ][ ] = {

"Creatorul-Serverului",
"Leader Of Admin's",
"Owner",
"GoodS",
"Semi-GodS",
"Super-Moderator",
"Admin",
"Helper",
"V.I.P",
"Slot"

};

new g_Flaguri[ GRUPURI ][ ] = {

"abcdefghijklmnopqrstu",
"abcdefghijklmnopqrst",
"abcdefghijlmnopqrs",
"abcdefghijlmnopqr",
"bcdefgijlmnopq",
"bcdefgijmnop",
"bcdefgijmn",
"bcefijmn",
"ab",
"a"

};


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, "\w%s \y- | \w%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;
}
Image


|¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯•.•¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯|
Image
|___________________________.•.___________________________|

|¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯•.•¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯|
Image
|___________________________.•.___________________________|

|¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯•.•¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯|
Image
|___________________________.•.___________________________|
User avatar
TNT * Killx
Membru
Membru
Posts: 334
Joined: 7 years ago
Location: DE(GE) - RO
Has thanked: 0
Been thanked: 0
Zodiac:
Age: 18
Contact:
Status: Offline

7 years ago

Unde il pun ?
Locked

Return to “Cerere Plugin”