Raised This Month: $ Target: $400
 0% 

read_flags() doesn't working


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 06-21-2017 , 20:52   Re: set_user_flags() doesn't working
Reply With Quote #3

The get_user_flags() works fine. I tested with log_amx() and it prints the message. The problem is the read_flags().

Tried the code:

PHP Code:
#include <amxmodx>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"

new const FreeFlags[ ] = { ADMIN_IMMUNITYADMIN_RESERVATIONADMIN_CHAT }

public 
plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)
}

public 
client_putinserver(id)
{
    new 
szConnectedName[32]
    
get_user_name(idszConnectedNamecharsmax(szConnectedName))
        
    if(~
get_user_flags(id) & ADMIN_LEVEL_H)
    {
        
log_amx("Player %s(ID: %d) has connected on the server. He hasn't 'qt' flags, giving those..."szConnectedNameid)

        new 
iFlags
        
for(new isizeof FreeFlags++ ) 
        {
            
iFlags = (iFlags FreeFlags[i])
            
set_user_flags(idiFlags)
        }
    }
    else
    {
        
log_amx("Player %s(ID: %d) has connected on the server. He has 'qt' flags."szConnectedNameid)
        
server_print("Voce ja tem o acesso 't'")
    }

Nothing was writed at the users.ini
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo

Last edited by EFFx; 06-21-2017 at 20:55.
EFFx 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 23:10.


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