Raised This Month: $ Target: $400
 0% 

Solved Failed to do the vip printlist


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
X3.
Junior Member
Join Date: Sep 2018
Old 11-30-2018 , 10:36   Failed to do the vip printlist
Reply With Quote #1

Hi,
Im using the VIP 1.9.1 vip system by aaarnas, I just wanted to edit something because there are many flags

So what I wanted to do is to add vip printlist and svip printlist, the deafult is only vip
register_clcmd("say /vips", "show_vips_online") , I added register_clcmd("say /svips", "show_svips_online")

The problem is I cannot check if user have this flags (according to the system custom flags from vips.ini)
So here is the default show_vips_online function (without my edits)
PHP Code:
public show_vips_online(id) {
    
    new 
bool:first truemessage[256], len
    
    
for (new i=0i<maxplayersi++) {
        
        if (
p_data[i][FLAGS]) {
            
            if (!
first) {
                
                
message[len++] = ','
                
message[len++] = ' '
            
}
            
message[len++] = '^4'
            
message[len] = EOS
            len 
+= get_user_name(imessage[len], charsmax(message)-len)
            
message[len++] = '^1'
            
message[len] = EOS
            
            first 
false
        
}
    }
    
    if (
first) {
        if (
is_amxmodx_new_versionclient_print_color(idid"^4[ZMVIP] ^1%L..."id"NO_VIP_ONLINE")
        else 
_client_print_color(id"^4[ZMVIP] ^1%L..."id"NO_VIP_ONLINE")
    }
    else {
        if (
is_amxmodx_new_versionclient_print_color(idid"^4[ZMVIP] ^1%L: %s."id"ONLINE_VIPS"message)
        else 
_client_print_color(id"^4[ZMVIP] ^1%L: %s."id"ONLINE_VIPS"message)
    }
    
    
print_admin_contacts(id)
    
    return 
PLUGIN_CONTINUE;

What I did is
PHP Code:
public show_vips_online(id
{
    new 
bool:first truemessage[256], len
    
    
for (new i=0i<maxplayersi++) 
    {
        
        if(
p_data[i][FLAGS] & AT_CHATTAG)
        {
            
            if (!
first) {
                
                
message[len++] = ','
                
message[len++] = ' '
            
}
            
message[len++] = '^4'
            
message[len] = EOS
            len 
+= get_user_name(imessage[len], charsmax(message)-len)
            
message[len++] = '^1'
            
message[len] = EOS
            
            first 
false
        
}
    }
    
    if (
first) {
        if (
is_amxmodx_new_versionclient_print_color(idid"^4[VIP] ^1%L..."id"NO_VIP_ONLINE")
        else 
_client_print_color(id"^4[VIP] ^1%L..."id"NO_VIP_ONLINE")
    }
    else {
        if (
is_amxmodx_new_versionclient_print_color(idid"^4[VIP] ^1%L: %s."id"ONLINE_VIPS"message)
        else 
_client_print_color(id"^4[VIP] ^1%L: %s."id"ONLINE_VIPS"message)
    }
    
    
print_admin_contacts(id)
    
    return 
PLUGIN_CONTINUE;
}
public 
show_svips_online(id)
{
    new 
bool:first truemessage[256], len
    
for (new i=0i<maxplayersi++)
    {
        if(
p_data[i][FLAGS] & AT_EXTRA_GRAVITY)
        {
            if(!
first)
            {
                
message[len++] = ','
                
message[len++] = ' '
            
}
            
message[len++] = '^4'
            
message[len] = EOS
            len 
+= get_user_name(imessage[len], charsmax(message)-len)
            
message[len++] = '^1'
            
message[len] = EOS
            first 
false
        
}
    }
    if(
first)
    {
        if (
is_amxmodx_new_versionclient_print_color(idid"^4[SVIP] ^1%L..."id"NO_SVIP_ONLINE")
        else 
_client_print_color(id"^4[SVIP] ^1%L..."id"NO_SVIP_ONLINE")
    }
    else
    {
        if (
is_amxmodx_new_versionclient_print_color(idid"^4[SVIP] ^1%L: %s."id"ONLINE_SVIPS"message)
        else 
_client_print_color(id"^4[SVIP] ^1%L: %s."id"ONLINE_SVIPS"message)
    }
    
    
print_admin_contacts(id)
    
    return 
PLUGIN_CONTINUE;

The problem is, if I write /vips, it shows the vips and svips users, same for /svips
Note that vip user doesnt have svip flags

Last edited by X3.; 12-01-2018 at 08:56. Reason: Solved
X3. is offline
Reply


Thread Tools
Display Modes

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 07:30.


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