Existing user? Sign in
Sign up
Games
Servers
Useful
User
Pass
2FA
[rezolvat]Modificare Plugin WHO
Freakz Forum Index
->
Trash Bin
->
CS 2006-2019 (Archived)
->
Plugins - Help / Support
Author
Message
453
fantasy-.-
[Mentally Stable]
Status: Offline
(since 21-01-2017 12:05)
Joined: 18 Jan 2017
Posts: 3
,
Topics: 2
Location:
Romania
Reputation:
1.1
Posted: 19-01-2017, 22:21:40
| Translate post to:
... (
Click for more languages
)
Salut as vrea sa imi modificati si mie pluginul acesta cand apare gen :
"|Nume admin | Grad "
"fantasy-.- Owner"
Sa adaugati dupa Grad si VIP si cand are si flagul t sa scrie gen:
"|Nume admin | Grad | VIP"
"fantasy-.- Owner Da"
SMA:
Spoiler:
#include <amxmodx>
#include <amxmisc>
#define PLUGIN "Plugin Who
#define VERSION "1.0"
#define AUTHOR "InTex"
#define GRUPURI 11
new const TITLU[] = "\y Nume admin \r| \w Grad ";
new const IESIRE[] = "\yIesire.^n";
new const NOADMINS[] = "\yNu sunt admini online.";
#pragma semicolon 1
new g_NumeGrade[ GRUPURI ][ ] = {
"Detinator",
"Maresal+VIP",
"Meresal",
"General+VIP",
"General",
"Colonel+VIP",
"Colonel",
"Maior",
"Sergent",
"Slot",
"VIP"
} ;
new g_Flaguri[ GRUPURI ][ ] = {
"abcdefghijklmnopqrstux",
"abcdefhijmnopqrsut",
"abcdefijmnopqrsut",
"bcdefijmnopqrst",
"bcdefijmopqrst",
"bcdefijmpqrst",
"bcdefijpqm",
"bcdefijmc",
"bcefijm",
"b",
"bit"
} ;
new g_ValueFlaguri[ GRUPURI ];
public plugin_init( ) {
for (new i = 0; i < GRUPURI ; i++)
{
g_ValueFlaguri[ i ] = read_flags( g_Flaguri[ i ] );
}
register_plugin("PLUGIN", VERSION, "AUTHOR");
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;
}
[/spoiler]
0
0
Back to top
TwisTer
[GOOGLE SEARCHER]
Status: Offline
(since 17-05-2023 01:23)
Joined: 04 May 2007
Posts: 6962
,
Topics: 147
Location:
Romania
Reputation:
2724.4
Votes
: 231
Posted: 20-01-2017, 13:04:33
| Translate post to:
... (
Click for more languages
)
Nu ma pricep eu asa bine la scripting, nu sunt scripter, dar de obicei reusesc sa rezolv, desi imi ia mai mult timp.
Am o rugaminte, alta data postati corect flagurile, sa nu stau 10 ore sa descifrez.
Uite aici :
Spoiler:
Code:
#include <amxmodx>
#include <amxmisc>
#define PLUGIN "Plugin Who"
#define VERSION "1.0"
#define AUTHOR "InTex"
#define GRUPURI 11
new const TITLU[] = " \wNume Admin \r| \wGrad \r| \wVIP";
new const IESIRE[] = "\y Iesire^n";
new const NOADMINS[] = "\y Nu sunt admini conectati.";
#pragma semicolon 1
new g_NumeGrade[ GRUPURI ][ ] = {
"\y| \rDetinator \y| \w DA",
"\y| \rMaresal+VIP \y| \w DA",
"\y| \rMaresal \y| \w NU",
"\y| \rGeneral+VIP \y| \w DA",
"\y| \rGeneral \y| \w NU",
"\y| \rColonel+VIP \y| \w DA",
"\y| \rColonel \y| \w NU",
"\y| \rMaior \y| \w NU",
"\y| \rSergent \y| \w NU",
"\y| \rSlot \y| \w NU",
"\y| \rVIP \y| \w DA"
};
new g_Flaguri[ GRUPURI ][ ] = {
"abcdefghijklmnopqrustx",
"abcdefhijklmnopqrust",
"abcdefhijklmnopqrus",
"bcdefhijmnopqrst",
"bcdefijmnopqrs",
"bcdefijmpqrst",
"bcdefijpqm",
"bcdefijm",
"bcefijm",
"b",
"bit"
};
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;
}
FISIERE DOWNLOAD
:
►
DOWNLOAD SURSA.SMA
►
DOWNLOAD COMPILEDFILE.AMXX
0
0
Back to top
fantasy-.-
[Mentally Stable]
Status: Offline
(since 21-01-2017 12:05)
Joined: 18 Jan 2017
Posts: 3
,
Topics: 2
Location:
Romania
Reputation:
1.1
Posted: 20-01-2017, 16:41:21
| Translate post to:
... (
Click for more languages
)
AM REZOLVAT TOT ! Multumesc
0
0
Back to top
Topic locked
Topic is closed, you cannot post any messages in it anymore
Locked by
-P!C@-
, 20 January 2017 16:36
Freakz Forum Index
->
Trash Bin
->
CS 2006-2019 (Archived)
->
Plugins - Help / Support
The time now is 10-06-2024, 03:57:52
Copyright info
Based on phpBB
ro
/
com
B
Login
I forgot my password
World of Warcraft
Login for more...
Download WoW 7.3.5
Misc
eSports
Achievements
Buy reputation with votes
Reputation trades
Forum rules
Ban list
Members list
User guide (FAQ)
World of Warcraft
View details