Raised This Month: $ Target: $400
 0% 

[REQ] Need [HELP] Tag Admin Plugin


Post New Thread Reply   
 
Thread Tools Display Modes
T0FF
Member
Join Date: Oct 2014
Location: Asia
Old 08-19-2015 , 10:45   Re: [REQ] Need [HELP] Tag Admin Plugin
Reply With Quote #11

Quote:
Originally Posted by Hartmann View Post
Which is a problem to add another prefix in the plugin?

I quickly created a better and simpler version of the admin_ranks. Try...
PHP Code:
#include <amxmodx>

#define HEADADMIN_CHAT_FLAG     ADMIN_IMMUNITY
#define ADMIN_CHAT_FLAG        ADMIN_LEVEL_E
#define VIP_CHAT_FLAG        ADMIN_LEVEL_F
#define SMS_CHAT_FLAG        ADMIN_LEVEL_G
#define HELP_CHAT_FLAG        ADMIN_LEVEL_C

new const g_szTag[][] = {
    
"",
    
"Head Admin",
    
"Admin",
    
"Mod",
    
"VIP",
    
"Help"
}

public 
plugin_init(){
    
register_message(get_user_msgid("SayText"),"handleSayText");
}
public 
handleSayText(msgIdmsgDestmsgEnt){
    new 
id get_msg_arg_int(1);
    
    if(
is_user_connected(id)){
        new 
szTmp[256],
        
szTmp2[256];
        
        new 
admin 0iFlags get_user_flags(id);
        
        if(
iFlags HEADADMIN_CHAT_FLAG)
            
admin 1
        
else if(iFlags ADMIN_CHAT_FLAG)
            
admin 2
        
else if(iFlags VIP_CHAT_FLAG)
            
admin 3
        
else if(iFlags SMS_CHAT_FLAG)
            
admin 4
        
else if(iFlags HELP_CHAT_FLAG)
            
admin 5
        
        
new szPrefix[64
        
formatex(szPrefix,charsmaxszPrefix ),"^x04[%s]",g_szTag[admin])    
        
get_msg_arg_string(2szTmpcharsmax(szTmp));
        
        
        if(!
equal(szTmp"#Cstrike_Chat_All")){
            
add(szTmp2charsmax(szTmp2), szPrefix);
            
add(szTmp2charsmax(szTmp2), " ");
            
add(szTmp2charsmax(szTmp2), szTmp);
        }
        else{
            
add(szTmp2charsmax(szTmp2), szPrefix);
            
add(szTmp2charsmax(szTmp2), "^x03 %s1^x01 :  %s2");
        }
        
set_msg_arg_string(2szTmp2);
    }
    return 
PLUGIN_CONTINUE;

You removed colors? It's not what i need bro.
Want to run admin_rank and vip_tag plugins together on my server.
But then the vip_tag plugin which you provided doesn't work.
T0FF is offline
Hartmann
Senior Member
Join Date: Nov 2014
Old 08-19-2015 , 11:51   Re: [REQ] Need [HELP] Tag Admin Plugin
Reply With Quote #12

Not a good idea to use two similar plugin, in contact with each other can cause error and even the question of whether one will work.
__________________

RETAKES v1.0
github.com/alghtryer/retakes

Contact : [email protected]

BTC Donate: 1QAh1NLmeHy81LF9r8PaeGjYqHL2BBcJTx

Hartmann 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 10:15.


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