Raised This Month: $51 Target: $400
 12% 

amx_who Problem


Post New Thread Reply   
 
Thread Tools Display Modes
Uzviseni Bog
Senior Member
Join Date: Jun 2020
Old 02-29-2024 , 13:00   Re: amx_who Problem
Reply With Quote #11

Quote:
Originally Posted by MrSnow View Post
But it doesnt print Like in the code i sent you.
Change
PHP Code:
console_print(id"-----[%d]%s-----"i+1g_groupNames[i]) 
Uzviseni Bog is offline
MrSnow
Junior Member
Join Date: Feb 2024
Old 02-29-2024 , 13:03   Re: amx_who Problem
Reply With Quote #12

It prints the server name and then the grades But not Like in the code i sent

Server name

Fondator

Owner

C-o owner

Etc Like this
MrSnow is offline
Uzviseni Bog
Senior Member
Join Date: Jun 2020
Old 02-29-2024 , 17:21   Re: amx_who Problem
Reply With Quote #13

Quote:
Originally Posted by MrSnow View Post
It prints the server name and then the grades But not Like in the code i sent

Server name

Fondator

Owner

C-o owner

Etc Like this
Try
PHP Code:
#include <amxmodx>
#include <amxmisc>
#define MAX_GROUPS 10
new g_groupNames[MAX_GROUPS][] = {
"Fondator",
"Owner",
"Co-Owner",
"Manager",
"Capitan",
"Administrator",
"Moderator",
"Helper",
"VIP",
"Slot"
};
new 
g_groupFlags[MAX_GROUPS][] = {
"abcdefghijklmnopqrstux",
"bcdefghijklmnopqrsu",
"abcdefijmnopqrsu",
"bcdefijmnopqrs",
"bcdefijmnopqr",
"bcdefijmnopq",
"bcdefijmno",
"bceijmno",
"bt",
"b"
};
new 
g_groupFlagsValue[MAX_GROUPS];

public 
plugin_init() {
    
register_plugin("Amx Who by eXtream""1.0""eXtreamCS.com");
    
register_concmd("amx_who0""cmdWho");
    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"============================================================");
    
console_print(id"                Lista Admine [Server Name]");
    
console_print(id"============================================================");
    for(
0MAX_GROUPSi++) {
        
console_print(id" ");
        
console_print(id"============================================================");
        
console_print(id"[%d]  => %s <="i+1g_groupNames[i]);
        
console_print(id"============================================================");
        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"============================================================");
    
console_print(id"              Lista Admine [Server Name]");
    
console_print(id"============================================================");
    return 
PLUGIN_HANDLED;

Uzviseni Bog is offline
MrSnow
Junior Member
Join Date: Feb 2024
Old 02-29-2024 , 17:57   Re: amx_who Problem
Reply With Quote #14

Its fixed, thank you and sorry for the long time im a beginner, you helped me a lot!
MrSnow is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 02-29-2024 , 21:34   Re: amx_who Problem
Reply With Quote #15

Quote:
Originally Posted by Uzviseni Bog View Post
Buddy, do I need to draw it for you? If you're inserting a new plugin, then remove the existing default plugin. Two plugins can't open with the same command, amx_who, so change the following.

PHP Code:
register_concmd("amx_who""cmdWho"0
To
PHP Code:
register_concmd("amx_who1""cmdWho"0
You can have two plugins that have the same command registered but there are some caveats. If you want to override a command in another plugin, you can put your plugin above the other plugin in plugins.ini and make sure you "return PLUGIN_HANDLED" at the end of the function.
__________________
fysiks is offline
Old 03-01-2024, 07:36
tedaimlocks
This message has been deleted by tedaimlocks.
Reply



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 20:00.


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