Arkadaşlar ct ye özel olucak bu plugin Gün x altına Gün 17-18 Kill Gün 19 FF Gün 20 Map Oylamasi diye bir yazı çıkıcak sağda solda fark etmez
@Mariachi
@CoonquaR
@Kirito
Temamızın yeni versiyonuna geçilmiştir.
Görüş & Önerileriniz için [email protected] adresine mail atabilirsiniz.
Reklam gösterimini engelleyici yazılım kullandığınızı görüyoruz.
Sitemizin ayakta kalıp sizlere hizmet edebilmek için en büyük gelir kaynağı sayfamızda gösterilen reklamlardır.
Reklam gösterimde bizim sayfamıza ayrıcalık tanıyarak ayakta kalmamıza destek olmak ister misiniz ?
Konu
Tamamdır
Son Düzenleme: 21-03-2017, Saat: 17:11, Düzenleyen: CoonquaR.
Kod:
#include <amxmodx>
#include <amxmisc>
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
#include <hamsandwich>
#include <fakemeta>
#include <engine>
#include <fakemeta_util>
#include <hamsandwich>
#define PLUGIN "Gun Plugini"
#define VERSION "1.2"
#define AUTHOR "Mlhcnshn"
#define SELECTMAPS 5
#define charsof(%1) (sizeof(%1)-1)
enum Color
{
NORMAL = 1, // clients scr_concolor cvar color
GREEN, // Green Color
TEAM_COLOR, // Red, grey, blue
GREY, // grey
RED, // Red
BLUE, // Blue
}
new TeamName[][] =
{
"",
"TERRORIST",
"CT",
"SPECTATOR"
}
ColorChat(id, Color:type, const msg[], {Float,Sql,Result,_}:...)
{
static message[256];
switch(type)
{
case NORMAL: // clients scr_concolor cvar color
{
message[0] = 0x01;
}
case GREEN: // Green
{
message[0] = 0x04;
}
default: // White, Red, Blue
{
message[0] = 0x03;
}
}
vformat(message[1], 251, msg, 4);
// Make sure message is not longer than 192 character. Will crash the server.
message[192] = '^0';
static team, ColorChange, index, MSG_Type;
if(id)
{
MSG_Type = MSG_ONE;
index = id;
} else {
index = FindPlayer();
MSG_Type = MSG_ALL;
}
team = get_user_team(index);
ColorChange = ColorSelection(index, MSG_Type, type);
ShowColorMessage(index, MSG_Type, message);
if(ColorChange)
{
Team_Info(index, MSG_Type, TeamName[team]);
}
}
ShowColorMessage(id, type, message[])
{
message_begin(type, get_user_msgid("SayText"), _, id);
write_byte(id)
write_string(message);
message_end();
}
Team_Info(id, type, team[])
{
message_begin(type, get_user_msgid("TeamInfo"), _, id);
write_byte(id);
write_string(team);
message_end();
return 1;
}
ColorSelection(index, type, Color:Type)
{
switch(Type)
{
case RED:
{
return Team_Info(index, type, TeamName[1]);
}
case BLUE:
{
return Team_Info(index, type, TeamName[2]);
}
case GREY:
{
return Team_Info(index, type, TeamName[0]);
}
}
return 0;
}
FindPlayer()
{
static i;
i = -1;
while(i <= get_maxplayers())
{
if(is_user_connected(++i))
{
return i;
}
}
return -1;
}
new gunsayisi,oylama;
new Array:g_mapName;
new g_mapNums;
new g_nextName[SELECTMAPS]
new g_voteCount[SELECTMAPS + 2]
new g_mapVoteNum
new g_lastMap[25]
new g_coloredMenus
new bool:g_selected = false
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
g_mapName=ArrayCreate(32);
new MenuName[64]
format(MenuName, 63, "CSAilesi | Map Secimi")
register_menucmd(register_menuid(MenuName), (-1^(-1<<(SELECTMAPS+2))), "countVote")
get_localinfo("lastMap", g_lastMap, 25)
set_localinfo("lastMap", "")
new maps_ini_file[64]
get_configsdir(maps_ini_file, 63);
format(maps_ini_file, 63, "%s/maps.ini", maps_ini_file);
if (!file_exists(maps_ini_file))
get_cvar_string("mapcyclefile", maps_ini_file, 63)
g_coloredMenus = colored_menus()
gunsayisi = 1;
register_event("TextMsg", "RoundRes", "a", "2=#Game_will_restart_in")
register_event("HLTV", "YeniRound", "a", "1=0", "2=0")
register_logevent("round_end", 2, "1=Round_End")
RegisterHam(Ham_Spawn, "player", "elbasi", 1)
oylama = register_cvar("map_oyla_gun", "20");
set_task(1.0,"guncelle",.flags="b");
}
public round_end()
{
gunsayisi++
}
public elbasi(id)
{
if(gunsayisi == 17)
{
ColorChat(0, GREEN, "^1[CSAilesi] ^4Gun 17 Olmustur Kill Cekiniz!!!")
ColorChat(0, GREEN, "^1[CSAilesi] ^4Gun 17 Olmustur Kill Cekiniz!!!")
}
else if(gunsayisi == 18)
{
ColorChat(0, GREEN, "^1[CSAilesi] ^4Gun 18 Olmustur Kill Cekiniz!!!")
ColorChat(0, GREEN, "^1[CSAilesi] ^4Gun 18 Olmustur Kill Cekiniz!!!")
}
else if(gunsayisi == 19)
{
ColorChat(0, GREEN, "^1[CSAilesi] ^4Gun 19 Olmustur FF'ler Baslasin!!!")
ColorChat(0, GREEN, "^1[CSAilesi] ^4Gun 19 Olmustur FF'ler Baslasin!!!")
}
}
public checkVotes()
{
new b = 0
for (new a = 0; a < g_mapVoteNum; ++a)
if (g_voteCount[b] < g_voteCount[a])
b = a
new smap[32]
if (g_voteCount[b] && g_voteCount[SELECTMAPS + 1] <= g_voteCount[b])
{
ArrayGetString(g_mapName, g_nextName[b], smap, charsof(smap));
set_cvar_string("amx_nextmap", smap);
ColorChat(0, GREEN, "^1[CSAilesi] ^4Map Oylamasi Bitti. Secilen Map:^3 %s", smap)
log_amx("Map Oylamasi: Map Oylamasi Bitti. Secilen Map: %s", smap)
set_task(3.0,"degis");
}else
{
ColorChat(0, GREEN, "^1[CSAilesi] ^4Herhangi Bir Oy Alinamadi. Oylama 3 Saniye Icerisinde Tekrar Baslayacaktir!")
g_selected = false
set_task(3.0,"Oyla");
}
}
public degis()
{
new smap[32];
get_cvar_string("amx_nextmap", smap, 31)
server_cmd("changelevel %s",smap)
}
public countVote(id, key)
{
if (get_cvar_float("amx_vote_answers"))
{
new name[32]
get_user_name(id, name, 31)
if (key == SELECTMAPS)
ColorChat(0, GREEN, "^1[CSAilesi]^3 %s ^4Isimli Oyuncu ^3Sure Uzatmayi ^4Secti!", name)
else if (key < SELECTMAPS)
{
new map[32];
ArrayGetString(g_mapName, g_nextName[key], map, charsof(map));
ColorChat(0, GREEN, "^1[CSAilesi]^3 %s ^4Isimli Oyuncunun Sectigi Map:^3 %s", name, map);
}
}
++g_voteCount[key]
return PLUGIN_HANDLED
}
bool:isInMenu(id)
{
for (new a = 0; a < g_mapVoteNum; ++a)
if (id == g_nextName[a])
return true
return false
}
public voteNextmap()
{
if (g_selected)
return
g_selected = true
new menu[512], a, mkeys = (1<<SELECTMAPS + 1)
new pos = format(menu, 511, g_coloredMenus ? "\rCSAilesi | Map Secimi:\w^n^n" : "CSAilesi | Map Secimi:^n^n")
new dmax = (g_mapNums > SELECTMAPS) ? SELECTMAPS : g_mapNums
for (g_mapVoteNum = 0; g_mapVoteNum < dmax; ++g_mapVoteNum)
{
a = random_num(0, g_mapNums - 1)
while (isInMenu(a))
if (++a >= g_mapNums) a = 0
g_nextName[g_mapVoteNum] = a
pos += format(menu[pos], 511, "%d. %a^n", g_mapVoteNum + 1, ArrayGetStringHandle(g_mapName, a));
mkeys |= (1<<g_mapVoteNum)
g_voteCount[g_mapVoteNum] = 0
}
menu[pos++] = '^n'
g_voteCount[SELECTMAPS] = 0
g_voteCount[SELECTMAPS + 1] = 0
new mapname[32]
get_mapname(mapname, 31)
new MenuName[64]
format(MenuName, 63, "CSAilesi | Map Secimi")
show_menu(0, mkeys, menu, 15, MenuName)
set_task(15.0, "checkVotes")
ColorChat(0, GREEN, "^1[CSAilesi]^4 Bir Sonraki Map Oylamasi Baslatildi.")
client_cmd(0, "spk Gman/Gman_Choose2")
log_amx("Map Oylamasi: Bir Sonraki Map Oylamasi Baslatildi.")
}
public Oyla()
{
new maps_ini_file[64]
get_configsdir(maps_ini_file, 63);
format(maps_ini_file, 63, "%s/maps.ini", maps_ini_file);
if (loadSettings(maps_ini_file))
voteNextmap();
}
stock bool:ValidMap(mapname[])
{
if ( is_map_valid(mapname) )
{
return true;
}
new len = strlen(mapname) - 4;
if (len < 0)
{
return false;
}
if ( equali(mapname[len], ".bsp") )
{
mapname[len] = '^0';
if ( is_map_valid(mapname) )
{
return true;
}
}
return false;
}
loadSettings(filename[])
{
if (!file_exists(filename))
return 0
new szText[32]
new currentMap[32]
new buff[256];
get_mapname(currentMap, 25)
new fp=fopen(filename,"r");
while (!feof(fp))
{
buff[0]='^0';
szText[0]='^0';
fgets(fp, buff, charsof(buff));
parse(buff, szText, charsof(szText));
if (szText[0] != ';' &&
ValidMap(szText) &&
!equali(szText, g_lastMap) &&
!equali(szText, currentMap))
{
ArrayPushString(g_mapName, szText);
++g_mapNums;
}
}
fclose(fp);
return g_mapNums
}
public RoundRes() {
gunsayisi = 0;
}
public YeniRound() {
if(gunsayisi == get_pcvar_num(oylama))
{
new maps_ini_file[64]
get_configsdir(maps_ini_file, 63);
format(maps_ini_file, 63, "%s/maps.ini", maps_ini_file);
if (loadSettings(maps_ini_file))
set_task(10.0,"voteNextmap");
ColorChat(0, GREEN, "^1[CSAilesi]^3 ^410 ^1sn ^3Sonra Map Oylamasi Basliyacaktir..")
}
}
public plugin_end()
{
new current_map[25]
get_mapname(current_map, 25)
set_localinfo("lastMap", current_map)
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1055\\ f0\\ fs16 \n\\ par }
*/
Son Düzenleme: 23-03-2017, Saat: 18:50, Düzenleyen: Mariachi.
@CoonquaR Eyvallah anlıyışın için Canım Artık Buralar Sana emanet
HE BIDE KONUYA UZUN SURE CEVAP GELMEDIGI ICIN COPE TASINDI
HE BIDE KONUYA UZUN SURE CEVAP GELMEDIGI ICIN COPE TASINDI
Konu Kilitlenip çöpe taşındı
Konu ile Alakalı Benzer Konular | |||||
Konular | Yazar | Yorumlar | Okunma | Son Yorum | |
Silinmiş Konu | Bunlara Özel Sma | umuthardworking | 2 | 362 |
24-12-2019, Saat: 18:09 Son Yorum: By.KinG |
|
Silinmiş Konu | MAPA ÖZEL EKLENTİ AYARLAMAK | goodfeelaras | 1 | 314 |
21-12-2019, Saat: 08:46 Son Yorum: By.KinG |
|
Silinmiş Konu | Webdiyo Özel Yeşil İcon +PSD | WX''Timer | 1 | 352 |
12-12-2019, Saat: 18:45 Son Yorum: By.KinG |
|
Silinmiş Konu | Kişi Özel Model | kerem123 | 1 | 296 |
30-11-2019, Saat: 11:58 Son Yorum: By.KinG |
|
Silinmiş Konu | Cskartali özel addons | ramil2123 | 1 | 288 |
22-11-2019, Saat: 23:38 Son Yorum: By.KinG |
Konuyu Okuyanlar: 1 Ziyaretçi