Raised This Month: $ Target: $400
 0% 

[REQ] /admin or /vip


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Pop0N
Member
Join Date: Apr 2011
Old 12-24-2011 , 13:45   Re: [REQ] /admin or /vip
Reply With Quote #3

ah adam z0na!
sure i'll give you.. that what friends do!

PHP Code:
#include <amxmodx>

#define VIP_ACCESS            ADMIN_KICK
#define ADMIN_ACCESS            ADMIN_RCON

new g_max_clientsgmsgSayText

public plugin_init() {
    
register_plugin("Admins&Vips Online""0.1""Pop0N")
    
    
g_max_clients get_maxplayers()
    
gmsgSayText get_user_msgid("SayText")
    
register_clcmd("say /admin""ShowVIPs")
    
register_clcmd("say_team /admin""ShowVIPs")
    
register_clcmd("say /admins""ShowVIPs")
    
register_clcmd("say_team /admins""ShowVIPs")
    
register_clcmd("say /vip""ShowVIPs")
    
register_clcmd("say_team /vip""ShowVIPs")
}

public 
ShowVIPs(user)
{
    
ShowAdmins(user)
    new 
message[256]
    new 
adminnames[33][32]
    new 
idcountxlen
    
    
for(id id <= g_max_clients id++)
        if(
is_user_connected(id))
            if(
get_user_flags(id) & VIP_ACCESS)
                
get_user_name(idadminnames[count++], 31)
    
len format(message255"^4Vips Online:^3 ")
    if(
count 0) {
        for(
count x++) {
            
len += format(message[len], 255-len"%s%s "adminnames[x], < (count-1) ? ", ":"")
            if(
len 96) {
                
print_message(usermessage)
                
len format(message255"^4 ")
            }
        }
        
print_message(usermessage)
    }
    else {
        
len += format(message[len], 255-len"^3No VIPs Online.")
        
print_message(usermessage)
    }
}

public 
ShowAdmins(user)
{
    new 
message[256]
    new 
adminnames[33][32]
    new 
idcountxlen
    
    
for(id id <= g_max_clients id++)
        if(
is_user_connected(id))
            if(
get_user_flags(id) & ADMIN_ACCESS)
                
get_user_name(idadminnames[count++], 31)
    
len format(message255"^4Admins Online:^3 ")
    if(
count 0) {
        for(
count x++) {
            
len += format(message[len], 255-len"%s%s "adminnames[x], < (count-1) ? ", ":"")
            if(
len 96) {
                
print_message(usermessage)
                
len format(message255"^4 ")
            }
        }
        
print_message(usermessage)
    }
    else {
        
len += format(message[len], 255-len"^3No Admins Online.")
        
print_message(usermessage)
    }
}

print_message(idmsg[]) {
    
message_begin(MSG_ONEgmsgSayText, {0,0,0}, id)
    
write_byte(id)
    
write_string(msg)
    
message_end()

Pop0N 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 20:45.


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