Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
takım ayarlama plugini
#2
PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fakemeta>
#include <fakemeta_util>

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

#define ADMIN_FLAG ADMIN_BAN

new Group[33] = -1;
new 
GroupTag[2][32];
new 
bool:fail;
new 
bool:fail2;

public 
plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_clcmd("say /ayarla","SetRandomTeam")
    
}
public 
SetRandomTeam(id) {
    if(!
access(id,ADMIN_FLAG)) {
        return 
PLUGIN_CONTINUE
    
}
    for(new 
i;i<32;i++) {
        
Group[i] = -1;
    }
    
GroupTag[0][0] = 0;
    
GroupTag[1][0] = 0;
    
fail false;
    
fail2 false;
    
    new 
players[32],inum,tempid,tag[32];
    
get_players(players,inum)
    for(new 
i;i<inum;i++) {
        
tempid players;
        
        new 
valid=get_user_tag(tempid,tag)
        
        if(!
valid) {
            
fail2 true;
        }
        
        if(
equali(tag,GroupTag[0])) {
            
Group[tempid] = 0;
        }
        else if(
equali(tag,GroupTag[1])) {
            
Group[tempid] = 1;
        }
        else {
            
            if(
GroupTag[0][0] == 0) {
                
copy(GroupTag[0],31,tag)
                
Group[tempid] = 0;
            }
            else if(
GroupTag[1][0] == 0) {
                
copy(GroupTag[1],31,tag)
                
Group[tempid] = 1;
            }
            else {
                
fail true;
                break
            }
        }
        
    }
    if(
fail) {
        
client_print(id,print_chat,"2 Adetten Fazla Tag Tespit Edildi: Ayarlama Basarisiz.")
        return 
PLUGIN_HANDLED
    
}
    else if(
fail2) {
        
client_print(id,print_chat,"Tagsiz Oyuncu Tespit Edildi: Ayarlama Basarisiz.")
        return 
PLUGIN_HANDLED
    
}
    
StartGrouping(id)
    return 
PLUGIN_HANDLED
}
public 
StartGrouping(id) {
    new 
players[32],inum,tempid;
    
get_players(players,inum)
    for(new 
i;i<inum;i++) {
        
tempid players;
        if(
Group[tempid] == 0) {
            
cs_set_user_team(tempid,CS_TEAM_CT)
            
fm_DispatchSpawn(tempid)
            
        }
        else if(
Group[tempid] == 1) {
            
cs_set_user_team(tempid,CS_TEAM_T)
            
fm_DispatchSpawn(tempid)
        }
    }
    
client_print(id,print_chat,"Takimlar Basariyla Olusturuldu: Ayarlama Basarili.")
    return 
PLUGIN_HANDLED
}
stock get_user_tag(idtag[]) {
    
    new 
name[32],spnum = -1;
    
get_user_name(id,name,31)
    
    for(new 
i;i<32;i++) {
        if(
name == '|' || name == '#') {
            
spnum i;
            break;
        }
    }
    if(
spnum == -1) return 0
    
    
return copy(tag,spnum,name)


Bu arada harika fikirmiş Smile Ben bunu bi' ara ayrı bir plugin olarak paylaşayım Big Grin[/i][/i][/i][/i][/i]


CS:GO ve CS 1.6 için ücretli eklenti yapılır.
Plugin yazmak isteyenlere yardımcı olabilirim.
Skype adresimden ulaşabilirsiniz:
destek_596
Steam: http://steamcommunity.com/id/ca-nemesis/

Reply


Messages In This Thread
takım ayarlama plugini - by shakespeare - 06-01-13, 00:03
Cevap: takım ayarlama plugini - by akcaliberkk - 07-01-13, 00:29

Possibly Related Threads…
Thread Author Replies Views Last Post
  Mapa Göre Cvar plugini melof 8 9,390 16-11-20, 02:00
Last Post: es_Dark_Es
  Time 15 Plugini fenerbahce07 24 12,160 23-09-18, 03:19
Last Post: qalatas06
  toplantı plugini bihterr 22 10,697 08-10-17, 14:21
Last Post: kronossbey
  Hosgeldin Plugini hpph1294 9 6,853 03-09-17, 18:08
Last Post: tahayasin
  Jailbreak Banka Plugini sefatokgoz 8 8,143 03-09-17, 18:06
Last Post: tahayasin
  [İSTEK]Jb Verme Plugini (/mg) NorDan 8 12,926 03-09-17, 18:06
Last Post: tahayasin
  250 Hp Plugini Sadece R Yetkisinde Olsun GurkanCounter 8 10,884 03-09-17, 18:04
Last Post: tahayasin
  [JB] CT Özel Hook Grab Rope Plugini Nobb 21 10,740 03-09-17, 18:03
Last Post: tahayasin
  Admin Zombie Model plugini satknun1997 3 3,814 01-01-17, 12:47
Last Post: RuLeT
  (JB) Can Revmenu plugini Furkan Dize 9 6,463 04-10-16, 23:35
Last Post: frozenbaba

Foruma Atla:


Users browsing this thread: 1 Guest(s)