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

amx_who problem


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Danielx931
Member
Join Date: Nov 2020
Old 11-30-2020 , 00:36   amx_who problem
Reply With Quote #1

Can anyone help me please, i tried to fix it myself, but I couldn't.
I really need it...thanks

// C:\Users\Daniel\Desktop\scripting\amx_who2.sm a(43) : error 052: multi-dimensional arrays must be fully initialized
// C:\Users\Daniel\Desktop\scripting\amx_who2.sm a(49) : warning 217: loose indentation
// C:\Users\Daniel\Desktop\scripting\amx_who2.sm a(50) : warning 217: loose indentation


PHP Code:
#include <amxmodx>
#include <amxmisc>
#define MAX_GROUPS 13

    
new g_groupNames[MAX_GROUPS][] = { //aici se afla numele fiecarui grad
"[1]  => Fondator <=",
"[2]  => Owner <=",
"[3]  => Co-Owner <=",
"[4]  => Manager <=",
"[5]  => God <=",
"[6]  => Semi-god <=",
"[7]  => Super-moderator <=",
"[8]  => Moderator <=",
"[9]  => Administrator <=",
"[10] => Helper <=",
"[11] => Lady <=",
"[12] => Vip <=",
"[13] => Reserved name <="

}
    new 
g_groupFlags[MAX_GROUPS][] = { //aici se afla flagurile doar pentru admine , fara flag-ul t (flag-ul t este cel mai folosit pentru VIP ACCES , eu l-am luat ca exemplu pe acesta).
    
"abcdefghijklmnopqrsu",
    
"abcdefghijmnopqrsu",
    
"abcdefghijmnopqrs",
    
"bcdefijmnopqrs",
    
"bcdefijmnopqr",
    
"bcdefijmnop",
    
"bcdefijmn",
    
"bcdefijm",
    
"bcdefij",
    
"bcdefj",
    
"abt",
    
"bt",
    
"b"
}
    new 
g_groupFlagsVIP[MAX_GROUPS][] = { //aici este creeat grupul de flaguri pentru admine+ flagul t. vip acces
    
"abcdefghijklmnopqrstu",
    
"abcdefghijmnopqrstu",
    
"abcdefghijmnopqrst",
    
"abt",
    
"bt"
}
       new 
g_groupFlagsValue[MAX_GROUPS]
   new 
g_groupFlagsValueVIP[MAX_GROUPS//am creeat un nou grup pe care pluginul trebuie sa il citeasca
    
public plugin_init() 
{
       
register_plugin("amx_who""1.0""")
   
register_concmd("amx_who""cmdWho")
       for(new 
0MAX_GROUPSi++) 
 {
   
g_groupFlagsValue[i] = read_flags(g_groupFlags[i])
   
g_groupFlagsValueVIP[i] = read_flags(g_groupFlagsVIP[i]) //citeste flagurile adminelor + vip
     
}
}
    public 
cmdWho(id
{
   new 
players[32], inumplayername[32], ia
   get_players
(playersinum)
   
console_print(id"-------------------------------")
   
console_print(id"=========ADMINS ONLINE=========")
   
console_print(id"-------------------------------")
   for(
0MAX_GROUPSi++) 
      {
   
console_print(id"[%d]%s"g_groupNames[i])
   for(
0inum; ++a
        {
   
player players[a]
   
get_user_name(playername31)
   if(
get_user_flags(player) == g_groupFlagsValue[i] || get_user_flags(player) == g_groupFlagsValueVIP[i]) //arata si adminii fara vip si pe cei cu vip 
           
{
   
console_print(id"%s"name)
           }
        }
      }
   
console_print(id"=========NUME SERVER=========")
   
console_print(id"-------------------------------")
   
client_cmd(id,"toggleconsole")
   return 
PLUGIN_HANDLED


Last edited by Danielx931; 11-30-2020 at 00:37.
Danielx931 is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 11-30-2020 , 07:23   Re: amx_who problem
Reply With Quote #2

g_groupFlagsVIP must have 13 entries.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Danielx931
Member
Join Date: Nov 2020
Old 12-02-2020 , 07:48   Re: amx_who problem
Reply With Quote #3

Working now but i have other problem it doesn't print the admins online just this line
console_print(id, "-------------------------------")
console_print(id, "=========ADMINS ONLINE=========")
console_print(id, "-------------------------------")
Danielx931 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 12-03-2020 , 00:09   Re: amx_who problem
Reply With Quote #4

If you don't see the last two console prints? Have you checked your error logs? An error after the console prints that work will prevent anything else in that function from working.
__________________
fysiks is offline
Danielx931
Member
Join Date: Nov 2020
Old 12-04-2020 , 04:47   Re: amx_who problem
Reply With Quote #5

Quote:
Originally Posted by fysiks View Post
If you don't see the last two console prints? Have you checked your error logs? An error after the console prints that work will prevent anything else in that function from working.
I checked the logs but no .. i don't see any error...
Danielx931 is offline
JocAnis
Veteran Member
Join Date: Jun 2010
Old 12-04-2020 , 14:20   Re: amx_who problem
Reply With Quote #6

console_print(id, "[%d]%s", g_groupNames[i])

What is %d for there?
__________________
KZ Public Autocup - PrimeKZ

My blog: http://primekz.xyz (in progress...) - not active (dec 2022)
JocAnis is offline
Danielx931
Member
Join Date: Nov 2020
Old 12-06-2020 , 04:15   Re: amx_who problem
Reply With Quote #7

Quote:
Originally Posted by JocAnis View Post
console_print(id, "[%d]%s", g_groupNames[i])

What is %d for there?
I didn't see thank you i will try again
Danielx931 is offline
Danielx931
Member
Join Date: Nov 2020
Old 12-06-2020 , 04:35   Re: amx_who problem
Reply With Quote #8

Quote:
Originally Posted by JocAnis View Post
console_print(id, "[%d]%s", g_groupNames[i])

What is %d for there?
Solved with your help thank you
Danielx931 is offline
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 02:31.


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