/*
,----.. .--.--. ,---,
/ / \ / / '. ' .' \
| : :| : /`. / / ; '.
. | ;. /; | |--` : : \
. ; /--` | : ;_ : | /\ \
; | ; \ \ `. | : ' ;. : -Yapımcı : SwindLer , WWW.CSAilesi.COM
| : | `----. \| | ;/ \ \ -Güncelleme : BeeTeeAy-B.T.A , WWW.CSAilesi.COM
. | '___ __ \ \ |' : | \ \ ,'
' ; : .'| / /`--' /| | ' '--'
' | '/ :'--'. / | : :
| : / `--'---' | | ,'
\ \ .' `--''
`---`
*/
#include < amxmodx >
#include < amxmisc >
#include < hamsandwich >
#include < cstrike >
#include < fun >
#define PLUGIN "Rekabetci Mod"
#define VERSION "1.1"
#define AUTHOR "CSAilesi.COM-Güncelleme : BeeTeeAy"
#define TAG "CSA"
/*----------------------------------------------------------------------------------------------
------------------------------------------{-NEWLER-}------------------------------------------*/
new secilenmap[200], bool:haritaoylamasix;
new round = 0
new el = 0
/*----------------------------------------------------------------------------------------------
------------------------------------------{-MAPLER-}------------------------------------------*/
// Yeni Harita Eklemek Icin {"de_melik",0} 'ın Yanına Bir Adet Virgül "," Alt Satırınada {"Harita Ismi",0} Yazıcaksınız.
// 51.Satırdaki "}" İşaretinden Bir Önceki Satır'da Yani 50.Satır'ın Sonunda "," Virgül Olmayacaktır Diğerlerinin Sonunda "," Virgül Olmalıdır.
new const Haritalar[][][] = {
{"Map Ismi",0},
{"csgo_dust2",0},
{"csgo_mirage",0},
{"csgo_inferno",0},
{"cs_mansion",0},
{"de_dust2_long",0},
{"csgo_dust2_night",0},
{"fy_minecraft",0},
{"csgo_assault",0},
{"csgo_dust2x2_go",0},
{"cs_assault",0},
{"de_melik",0}
}
public plugin_init() {
register_plugin( PLUGIN, VERSION, AUTHOR )
register_event( "TextMsg","eRestart","a","2=#Game_will_restart_in","2=#Game_Commencing" );
register_event( "HLTV", "elbasi", "a", "1=0", "2=0" );
register_logevent("round_end", 2, "1=Round_End");
register_clcmd("say round","rounds")
}
public rounds()
{
round = 14
el = 14
}
public elbasi()
{
if(round == 15 )
{
set_task(5.1, "haritaoylamasi")
set_task(15.0, "oylama_bitti")
}
}
public bilgiver()
{
renkli_yazi(0, "!g[BILGI] !tTurlar [%d/15]",el)
}
public eRestart()
{
round = 0
el = 0
}
public disarmvakticanim() {
new players[32],inum,id
get_players(players,inum)
for(new i;i<inum;i++)
{
id = players[i]
strip_user_weapons(id)
give_item(id, "weapon_knife")
}
}
public resetzamanibebegim() {
new players[32],inum,id
get_players(players,inum)
for(new i;i<inum;i++)
{
id = players[i]
cs_set_user_money(id, 800)
}
}
public delayed_team_change(id) {
switch(cs_get_user_team(id))
{
case CS_TEAM_T: cs_set_user_team(id,CS_TEAM_CT)
case CS_TEAM_CT: cs_set_user_team(id,CS_TEAM_T)
}
ExecuteHamB(Ham_CS_RoundRespawn,id)
}
public round_end()
{
el ++
round ++
if(round == 15 || round > 15)
{
server_cmd("amx_map %s",secilenmap)
}
else if(round == 15 )
{
set_task(0.3,"disarmvakticanim")
}
}
public haritaoylamasi()
{
new players[32], inum;
static Uid;
get_players(players, inum)
for(new i; i < inum; i++) {
Uid = players[i];
haritaoylamasix = true
static Item[64]
formatex(Item, sizeof(Item) - 1, "\rHarita Oylamasi")
new menu = menu_create(Item, "haritaoylamasi_devam")
new i;
for(i=1;i<sizeof Haritalar;i++)
{
new szid[10]
num_to_str(i,szid,9)
formatex(Item, sizeof(Item) - 1, "%s", Haritalar[i][0])
menu_additem(menu, Item, szid)
}
menu_setprop(menu, MPROP_EXIT, MEXIT_ALL)
menu_display(Uid, menu, 0)
}
}
public haritaoylamasi_devam(id, menu, item)
{
if(item == MENU_EXIT)
{
menu_destroy(menu);
return PLUGIN_HANDLED;
}
new data[6], iName[64], Access, Callback
menu_item_getinfo(menu, item, Access, data, sizeof(data), iName, sizeof(iName), Callback)
new key = str_to_num(data)
Haritalar[key][1][0]+=1
oylama_sonucu(id)
menu_destroy(menu);
return PLUGIN_HANDLED;
}
public oylama_sonucu(id)
{
static Item[64]
formatex(Item, sizeof(Item) - 1, "\rHarita Oylamasi")
new menu = menu_create(Item, "oylama_sonucu2")
new i;
for(i=1;i<sizeof Haritalar;i++)
{
formatex(Item, sizeof(Item) - 1, "%s \d[\r %d \d]", Haritalar[i][0], Haritalar[i][1][0])
menu_additem(menu, Item, "1")
}
menu_setprop(menu, MPROP_EXIT, MEXIT_NEVER)
menu_display(id, menu, 0)
}
public oylama_sonucu2(id, menu, item)
{
if(item == MENU_EXIT)
{
menu_destroy(menu);
return PLUGIN_HANDLED;
}
new data[6], iName[64], Access, Callback
menu_item_getinfo(menu, item, Access, data, sizeof(data), iName, sizeof(iName), Callback)
new key = str_to_num(data)
switch(key)
{
case 1: {
if(haritaoylamasix)
{
oylama_sonucu(id)
}
}
}
menu_destroy(menu);
return PLUGIN_HANDLED;
}
public oylama_bitti()
{
haritaoylamasix = false
new i,j;
for(i=1;i<sizeof Haritalar;i++)
{
for(j=1;j<sizeof (Haritalar) - 1;j++)
{
new gecici,gecici2[300];
if(Haritalar[j][1][0] < Haritalar[j+1][1][0])
{
gecici = Haritalar[j][1][0]
Haritalar[j][1][0] = Haritalar[j+1][1][0]
Haritalar[j+1][1][0] = gecici
formatex(gecici2,charsmax(gecici2),"%s",Haritalar[j][0])
formatex(Haritalar[j][0],charsmax(Haritalar),"%s",Haritalar[j+1][0])
formatex(Haritalar[j+1][0],charsmax(Haritalar),"%s",gecici2)
}
}
}
renkli_yazi(0,"!n[!g %s !n] !tOylamada !g%s !nCikti! !tEl Sonu Map Degisecektir",TAG,Haritalar[1][0])
formatex(secilenmap,charsmax(secilenmap),"%s",Haritalar[1][0])
}
stock renkli_yazi(const id, const input[], any:...)
{
new count = 1, players[32]
static msg[191]
vformat(msg, sizeof(msg) - 1, input, 3)
replace_all(msg, 190, "!n", "^x01")
replace_all(msg, 190, "!g", "^x04")
replace_all(msg, 190, "!t", "^x03")
if(id) players[0] = id; else get_players(players, count, "ch")
for(new i = 0; i < count; i++)
{
if(is_user_connected(players[i]))
{
message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i])
write_byte(players[i])
write_string(msg)
message_end()
}
}
}