CSPLague
/admin Plugini Farklı - Printable Version

+- CSPLague (https://www.csplague.com)
+-- Forum: CS 1.6 Plugin (Eklenti) Bölümü (https://www.csplague.com/forumdisplay.php?fid=6)
+--- Forum: [İSTEK] Cs 1.6 Plugin İstek Bölümü (https://www.csplague.com/forumdisplay.php?fid=80)
+---- Forum: Çözülmüş İstekler (https://www.csplague.com/forumdisplay.php?fid=87)
+---- Thread: /admin Plugini Farklı (/showthread.php?tid=7874)



/admin Plugini Farklı - Kuheylan94 - 28-06-13

Arkadaşlar var mı bilmiyorum böyle bi plugin varsa kusuruma bakmayın. /admin yazınca ban yetkisi olanlar Online Adminler:x,y Şeklinde slot yetkisi olanlar Online Slotlar: z,t şeklinde görünmesini istiyorum

PHP Code:
#include <amxmodx>

/*---------------EDIT ME------------------*/
#define ADMIN_CHECK ADMIN_KICK

static const COLOR[] = "^x04" //green
static const CONTACT[] = ""
/*----------------------------------------*/

new maxplayers
new gmsgSayText

public plugin_init() {
    
register_plugin("Admin Check""1.51""OneEyed")
    
maxplayers get_maxplayers()
    
gmsgSayText get_user_msgid("SayText")
    
register_clcmd("say""handle_say")
    
register_cvar("amx_contactinfo"CONTACTFCVAR_SERVER)
}

public 
handle_say(id) {
    new 
said[192]
    
read_args(said,192)
    if( ( 
containi(said"who") != -&& containi(said"admin") != -) || contain(said"/admin") != -)
        
set_task(0.1,"print_adminlist",id)
    return 
PLUGIN_CONTINUE
}

public 
print_adminlist(user
{
    new 
adminnames[33][32]
    new 
message[256]
    new 
contactinfo[256], contact[112]
    new 
idcountxlen
    
    
for(id id <= maxplayers id++)
        if(
is_user_connected(id))
            if(
get_user_flags(id) & ADMIN_CHECK)
                
get_user_name(idadminnames[count++], 31)

    
len format(message255"%s ADMINS ONLINE: ",COLOR)
    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"%s ",COLOR)
            }
        }
        
print_message(usermessage)
    }
    else {
        
len += format(message[len], 255-len"No admins online.")
        
print_message(usermessage)
    }
    
    
get_cvar_string("amx_contactinfo"contact63)
    if(
contact[0])  {
        
format(contactinfo111"%s Contact Server Admin -- %s"COLORcontact)
        
print_message(usercontactinfo)
    }
}

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




Cevap: /admin Plugini Farklı - akcaliberkk - 28-06-13

PHP Code:
#include <amxmodx>
#include <amxmisc>

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

#define ADMIN_FLAG ADMIN_BAN
#define SLOT_FLAG ADMIN_RESERVATION

new message_saytext;
public 
plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_clcmd("say /admin","HookSay")
    
register_clcmd("say /admins","HookSay")
    
    
message_saytext get_user_msgid("SayText");
}
public 
HookSay(id) {
    new 
players[32],inum;
    new 
a_text[256],s_text[256],a_count,s_count;
    
get_players(players,inum)
    static 
tempid,name[32];
    for(new 
i;i<inum;i++) {
        
tempid players[i];
        if(
access(tempid,ADMIN_FLAG)) {
            
get_user_name(tempid,name,31)
            
format(a_text,255,"%s %s,",a_text,name)
            
a_count++
        }
        else if(
access(tempid,SLOT_FLAG)) {
            
get_user_name(tempid,name,31)
            
format(s_text,255,"%s %s,",s_text,name)
            
s_count++
        }
    }
    
format(a_text,255,"^4Online Adminler: ^3%s"a_count a_text "Online Admin Yok")
    
format(s_text,255,"^4Online Slotlar: ^3%s"s_count s_text "Online Slot Yok")
    
message_begin(MSG_ONEmessage_saytext, {0,0,0}, id)
    
write_byte(id)
    
write_string(a_text)
    
message_end()
    
message_begin(MSG_ONEmessage_saytext, {0,0,0}, id)
    
write_byte(id)
    
write_string(s_text)
    
message_end()




Cevap: /admin Plugini Farklı - Kuheylan94 - 28-06-13

teşekkürler


Cevap: /admin Plugini Farklı - akcaliberkk - 29-06-13

Çözülmüş İsteklere taşındı.