Raised This Month: $ Target: $400
 0% 

[HELP]Modified amx_who


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Kakkarot
New Member
Join Date: Oct 2010
Old 10-08-2010 , 06:09   [HELP]Modified amx_who
Reply With Quote #1

Hello, i would like your help in modifying a plugin similar to the amx_who command. This is the plugin's .sma :


PHP Code:
#include <amxmodx>
#include <amxmisc>

#define ACCESS ADMIN_ADMIN
#define MAX_GROUPS 9
new g_groupNames[MAX_GROUPS][] = {
"-=[Owner]=-",
"-=[Co-Owner]=-",
"-=[God]=-",
"-=[Super Moderator]=-",
"-=[Moderator]=- ",
"-=[Administrator]=- ",
"-=[Semi Administrator]=-",
"-=[Helper]=-",
"-=[Slot]=-"
}
new 
g_groupFlags[MAX_GROUPS][] = {
"abcdefghijklmnopqrstu",
"bcdefghijklmnopqrst",
"bcdefghijlmnopqrst",
"bcdefghijlmnopqrs",
"bcdefgijlmnopqr",
"bcdefgijmnop",
"bcdefgijmn",
"bcefijmn",
"b"
}
new 
g_groupFlagsValue[MAX_GROUPS]
public 
plugin_init() 
{
register_plugin("Admin_Who""1.0""SileNNNT")
register_concmd("admin_who""cmdWho",ACCESS)
for(new 
0MAX_GROUPSi++) 
{
g_groupFlagsValue[i] = read_flags(g_groupFlags[i])
}
}
public 
cmdWho(id
{
new 
players[32], inumplayername[32], ia
get_players
(playersinum)
console_print(id"[ Admini Online ]")
for(
0MAX_GROUPSi++) 
{
console_print(id"-----[%d]%s-----"i+1g_groupNames[i])
for(
0inum; ++a
{
player players[a]
get_user_name(playername31)
if(
get_user_flags(player) == g_groupFlagsValue[i]) 
{
console_print(id"%s"name)
}
}
}
console_print(id"[ Admini Online ]")
return 
PLUGIN_HANDLED

The problem is that the command admin_who is usable to all classes of flags instead of ADMIN_ADMIN. this is what i want : to make the command admin_who only usable by admins. I know that amx_who does that very thing, but it shows the accesses chaotic somehow. this way it would be clear what's the rank of every admin.

I also tried to modify cmdaccess.ini as follows :
Code:
"admin_who"     "y"           ; admin_who.amxx
with no effect whatsoever on the command.

Thank You in advance for your help!

P.S. i have searched prior to my posting for a solution but i haven't found one.

Last edited by Kakkarot; 10-08-2010 at 11:28. Reason: incomplete
Kakkarot is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:16.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode