Kod: Tümünü seç
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <hamsandwich>
#include <nvault>
#define MAX_MAP 250
#define OYLAMA_BASLATMA_YETKiSi ADMIN_MAP
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 g_iTimerVote[33];
new g_iNumRTV;
new g_iPlayerProcc;
new bool:g_LastRound;
new b_HasRTV[33];
new Float:g_iLastSec[33];
new bool:g_Vote;
new bool:b_HasAlreadyVoted[33];
new iAllVoted;
new sonuc;
new SmiLe[MAX_MAP][250],configsdir[250],komutdosyasi[250],CSmiLeFaCe[MAX_MAP][250],CSmiLeFaCee,FaCe[6],LeFa[6];
#define TimeVote 30
new Sembol[3] = "%"
new bironcekiharita;
new bironcekiharitacevir[32];
new ondanbironcekiharita;
new ondanbironcekiharitacevir[32];
new ondanbirbironcekiharita;
new ondanbirbironcekiharitacevir[32];
new elsonunubekle
new T_ismi;
new T_isim_yardimci[32];
new CT_ismi;
new CT_isim_yardimci[32];
new ct_score, terrorist_score;
new oyun_sonu_restart
new bilgilendirme
new kalan_tur
new harita[32]
new oyun_sonu_harita_oylamasi
new oyun_suresi
new hedef_skor
new oylama_istegi
new oyun_sonu_islem
new zaman_islem
new Giris
new Dosya
new satirbir[] = "bir";
new satiruc[] = "uc";
new satirdort[] = "dort";
new satirbes[] = "bes";
new satiralti[] = "alti";
new satiryedi[] = "yedi";
public plugin_init()
{
register_plugin("Harita Degisim Sistemi", "3.0", "Fatih ~ EjderYa + CSmiLeFaCe");
register_clcmd("say /turmenu", "adminmenu")
register_clcmd("tur_sayac_menusu", "adminmenu")
register_clcmd("say /oylamabaslat", "OylamaBaslatmak")
register_clcmd("amx_oylama_baslat", "OylamaBaslatmak")
register_clcmd("say /RTV", "RockTheVote")
register_clcmd("say !RTV", "RockTheVote")
register_clcmd("say .RTV", "RockTheVote")
register_clcmd("say /harita", "RockTheVote")
register_clcmd("say /map", "RockTheVote")
register_clcmd("say /mapdegis", "RockTheVote")
register_clcmd("say /haritalar", "oynanilanharitalarinsirasi")
register_clcmd("say !haritalar", "oynanilanharitalarinsirasi")
register_clcmd("say .haritalar", "oynanilanharitalarinsirasi")
register_concmd("say nextmap", "Show_Nextmap")
register_concmd("amx_oylama_baslat", "OylamaBaslatmak", ADMIN_MAP );
register_menucmd(register_menuid("VoteMenu"), 1023, "ActionVoteMenu");
T_ismi = register_cvar("T_ismi","TERORiSTLER")
CT_ismi = register_cvar("CT_ismi","POLiSLER")
get_pcvar_string(T_ismi,T_isim_yardimci,31)
get_pcvar_string(CT_ismi,CT_isim_yardimci,31)
register_logevent("RoundEnd", 2, "1=Round_End")
elsonunubekle = register_cvar("amx_elsonunubekle","1")
bironcekiharita = register_cvar("amx_bironcekiharita","YOK")
get_pcvar_string(bironcekiharita,bironcekiharitacevir,31)
ondanbironcekiharita = register_cvar("amx_ondanbironcekiharita","YOK")
get_pcvar_string(ondanbironcekiharita,ondanbironcekiharitacevir,31)
ondanbirbironcekiharita = register_cvar("amx_ondanbirbironcekiharita","YOK")
get_pcvar_string(ondanbirbironcekiharita,ondanbirbironcekiharitacevir,31)
new suankimap[250];
get_mapname(suankimap,249);
set_cvar_string("amx_ondanbirbironcekiharita", ondanbironcekiharitacevir);
set_cvar_string("amx_ondanbironcekiharita", bironcekiharitacevir);
set_cvar_string("amx_bironcekiharita", suankimap);
register_cvar("amx_nextmap", "");
set_cvar_string("amx_nextmap", "");
register_event("TeamScore", "team_score", "a");
set_task(1.0,"score_round",_,_,_,"b")
get_mapname(harita, 31)
register_event("HLTV", "yenitur_basladi", "a", "1=0", "2=0")
zaman_islem = 1
Giris = 0
oyun_sonu_restart = 0
oyun_sonu_harita_oylamasi = 0
oyun_suresi = 25
hedef_skor = 30
oylama_istegi = 1
set_task(15.0,"VerileriYukle")
set_task(45.0, "ClCmdVote", _, _, _, "d")
}
public ChooseMap(id)
{
if(!g_Vote)
return PLUGIN_CONTINUE;
new szMenu[512], iLen, iKey, szSec[32]
iLen = format(szMenu[iLen], charsmax(szMenu)-iLen, "\yHarita Oylama Zamani^n\dOylamanin bitmesine \r%d \dSaniye^n", g_iTimerVote[id], szSec)
for(new q; q < 5; q++)
{
if(!b_HasAlreadyVoted[id])
iLen += format(szMenu[iLen], charsmax(szMenu)-iLen, "^n\r%d. \w%s \d[\y%d%%\d]",q+1, CSmiLeFaCe[LeFa[q]], FaCe[q] * g_iPlayerProcc)
else
iLen += format(szMenu[iLen], charsmax(szMenu)-iLen, "^n\d%s [\y%d%%\d]", CSmiLeFaCe[LeFa[q]], FaCe[q] * g_iPlayerProcc)
}
if(!b_HasAlreadyVoted[id])
{
iKey |= MENU_KEY_0;
iLen += format(szMenu[iLen], charsmax(szMenu)-iLen, "^n^n\r0. \wOylamaya Katilma")
}
iLen += format(szMenu[iLen], charsmax(szMenu)-iLen, "^n^n\yGeçerli oy sayisi: \r%d", iAllVoted)
iKey |= MENU_KEY_0|MENU_KEY_1|MENU_KEY_2|MENU_KEY_3|MENU_KEY_4|MENU_KEY_5
if(b_HasAlreadyVoted[id]){
//iKey &= ~(MENU_KEY_1|MENU_KEY_2|MENU_KEY_3|MENU_KEY_4|MENU_KEY_5);
}
show_menu(id, iKey, szMenu, -1, "VoteMenu");
return PLUGIN_HANDLED;
}
public ActionVoteMenu(id, iKey)
{
if(!g_Vote){
return PLUGIN_CONTINUE;
}
new szName[32]
get_user_name(id, szName, 31)
if(b_HasAlreadyVoted[id]){
if ( iKey == 0 ) client_cmd(id,"slot1"),ChooseMap(id)
if ( iKey == 1 ) client_cmd(id,"slot2"),ChooseMap(id)
if ( iKey == 2 ) client_cmd(id,"slot3"),ChooseMap(id)
if ( iKey == 3 ) client_cmd(id,"slot4"),ChooseMap(id)
if ( iKey == 4 ) client_cmd(id,"slot5"),ChooseMap(id)
if ( iKey == 9 ) client_cmd(id,"slot10"),ChooseMap(id)
return PLUGIN_HANDLED
}
if(iKey == 9)
{
if(!b_HasAlreadyVoted[id])
ChatColor(0, "!g%s !teamoylamaya katilmadi.", szName);
b_HasAlreadyVoted[id] = true;
return PLUGIN_CONTINUE;
}
iAllVoted++;
FaCe[iKey]++
client_cmd(id, "spk plats/elevbell1")
b_HasAlreadyVoted[id] = true;
ChatColor(0, "!g%s !teamoyuncusunun sectigi harita !g%s", szName, CSmiLeFaCe[LeFa[iKey]]);
return PLUGIN_HANDLED;
}
public endvote()
{
new kazanan = LeFa[0], eniyiharita = FaCe[0];
for(new i = 0; i <5; i++){
if(FaCe[i] > eniyiharita){
kazanan = LeFa[i];
eniyiharita = FaCe[i];}
}
g_Vote = false;
if(!is_map_valid(CSmiLeFaCe[kazanan]))
{
FaCe[0] = 0;
FaCe[1] = 0;
FaCe[2] = 0;
FaCe[3] = 0;
FaCe[4] = 0;
iAllVoted = 0;
client_cmd(0, "spk buttons/button10.wav")
set_task(5.0, "ClCmdVote");
ChatColor(0, "!teamSeçilen harita !g%s ^"!ycstrike/maps!g^" !teamklasöründe !gYOK.!teamOylama islemi yeniden yapilacak.", CSmiLeFaCe[kazanan])
return PLUGIN_HANDLED;
}
ChatColor(0, "!teamSonraki Harita: !g%s", CSmiLeFaCe[kazanan])
set_cvar_string("amx_nextmap", CSmiLeFaCe[kazanan]);
sonuc = kazanan;
if(get_pcvar_num(elsonunubekle) == 1){
g_LastRound = true;
ekran_mesaj_noktasi( 149,68,0, -1.0, -0.70, 2, 4.0, 11.0, 0.01, 1.5 )
ekran_mesaji(0, "Sonraki Harita: %s^nHarita el sonunda degisecek",CSmiLeFaCe[kazanan])
}
else{
set_task(1.0, "changelevel");
}
return PLUGIN_HANDLED;
}
public VerileriYukle()
{
new YuklemeBir = nvault_get( Dosya , satirbir );
new Yuklemeuc = nvault_get( Dosya , satiruc );
new Yuklemedort = nvault_get( Dosya , satirdort );
new Yuklemebes = nvault_get( Dosya , satirbes );
new Yuklemealti = nvault_get( Dosya , satiralti );
new Yuklemeyedi = nvault_get( Dosya , satiryedi );
if ( YuklemeBir )
{
oyun_sonu_restart = YuklemeBir
}
if ( Yuklemeuc )
{
bilgilendirme = Yuklemeuc
}
if ( Yuklemedort )
{
oyun_sonu_harita_oylamasi = Yuklemedort
}
if ( Yuklemebes )
{
oyun_suresi = Yuklemebes
}
if ( Yuklemealti )
{
hedef_skor = Yuklemealti
}
if ( Yuklemeyedi )
{
oylama_istegi = Yuklemeyedi
}
zaman_islem = 0
Giris = 1
}
public plugin_precache()
{
precache_sound("harita_oylama_sesi.wav")
}
public plugin_cfg()
{
Dosya = nvault_open( "HaritaDegisimSistemiVerileri" );
if ( Dosya == INVALID_HANDLE )
set_fail_state( "Vault Dosyasi Acilamadi !" );
}
public plugin_end()
{
nvault_close( Dosya );
}
public adminmenu(id){
if (get_user_flags(id) && ADMIN_CVAR ) {
if ( Giris == 1 ) {
new menu = menu_create("\r [ \y~ OTOMATiK YONETiM AYARLARI\y~ \r]^n \rNOT :\y KAYIT ETTiGiNiZ AYARLAR HARiTA DEGiSiMiNDEN^n SONRA AKTiF OLACAKTIR.", "adminmenudevam")
if ( oyun_sonu_harita_oylamasi == 1 && oyun_sonu_restart == 0 ){
menu_additem(menu, "\wTUR BiTiMi OTOMATiK HARiTA OYLAMA \rACIK", "1",ADMIN_CVAR)
}
if ( oyun_sonu_harita_oylamasi == 1 && oyun_sonu_restart == 1 ){
menu_additem(menu, "\wTUR BiTiMi OTOMATiK HARiTA OYLAMA \yBOZUK", "1",ADMIN_CVAR)
}
if ( oyun_sonu_harita_oylamasi == 0 && oyun_sonu_restart == 0 ){
menu_additem(menu, "\wTUR BiTiMi OTOMATiK HARiTA OYLAMA \dKAPALI", "1",ADMIN_CVAR)
}
if ( oyun_sonu_harita_oylamasi == 0 && oyun_sonu_restart == 1 ){
menu_additem(menu, "\wTUR BiTiMi OTOMATiK HARiTA OYLAMA \dKAPALI", "1",ADMIN_CVAR)
}
if ( oyun_sonu_restart == 1 && oyun_sonu_harita_oylamasi == 0 ){
menu_additem(menu, "\wTUR BiTiMi OTOMATiK RESET ATMA \rACIK", "2",ADMIN_CVAR)
}
if ( oyun_sonu_restart == 1 && oyun_sonu_harita_oylamasi == 1 ){
menu_additem(menu, "\wTUR BiTiMi OTOMATiK RESET ATMA \yBOZUK", "2",ADMIN_CVAR)
}
if ( oyun_sonu_restart == 0 && oyun_sonu_harita_oylamasi == 1 ){
menu_additem(menu, "\wTUR BiTiMi OTOMATiK RESET ATMA \dKAPALI", "2",ADMIN_CVAR)
}
if ( oyun_sonu_restart == 0 && oyun_sonu_harita_oylamasi == 0 ){
menu_additem(menu, "\wTUR BiTiMi OTOMATiK RESET ATMA \dKAPALI", "2",ADMIN_CVAR)
}
if ( bilgilendirme == 0 ){
menu_additem(menu, "\wEL BASI BiLGiLENDiRME MESAJI \dKAPALI", "3",ADMIN_CVAR)
}
if ( bilgilendirme == 1 ){
menu_additem(menu, "\wEL BASI BiLGiLENDiRME MESAJI \rALTTAN YAZIYLA", "3",ADMIN_CVAR)
}
if ( bilgilendirme == 2 ){
menu_additem(menu, "\wEL BASI BiLGiLENDiRME MESAJI \rEKRANA YANSITARAK", "3",ADMIN_CVAR)
}
if ( oyun_sonu_harita_oylamasi == 0 && oyun_sonu_restart == 0 ){
if ( oyun_suresi == 15 || oyun_suresi == 20 || oyun_suresi == 25 || oyun_suresi == 30 || oyun_suresi == 35 || oyun_suresi == 40 ){
if ( oyun_suresi == 15 ){
menu_additem(menu, "\wOYUN SURESi \w [\r 15 dk\w ]", "4",ADMIN_CVAR)
}
if ( oyun_suresi == 20 ){
menu_additem(menu, "\wOYUN SURESi \w [\r 20 dk\w ]", "4",ADMIN_CVAR)
}
if ( oyun_suresi == 25 ){
menu_additem(menu, "\wOYUN SURESi \w [\r 25 dk\w ]", "4",ADMIN_CVAR)
}
if ( oyun_suresi == 30 ){
menu_additem(menu, "\wOYUN SURESi \w [\r 30 dk\w ]", "4",ADMIN_CVAR)
}
if ( oyun_suresi == 35 ){
menu_additem(menu, "\wOYUN SURESi \w [\r 35 dk\w ]", "4",ADMIN_CVAR)
}
if ( oyun_suresi == 40 ){
menu_additem(menu, "\wOYUN SURESi \w [\r 40 dk\w ]", "4",ADMIN_CVAR)
}
}
else
{
menu_additem(menu, "\wOYUN SURESi \w [\r -\w ]", "4",ADMIN_CVAR)
}
}
else
{
menu_additem(menu, "\d------------------------", "4",ADMIN_CVAR)
}
//////////////////////////////////////////////////////////////////////// HEDEF SKOR AYARI
if ( oyun_sonu_harita_oylamasi == 1 || oyun_sonu_restart == 1 ){
if ( hedef_skor == 5 || hedef_skor == 10 || hedef_skor == 15 || hedef_skor == 20 || hedef_skor == 25 || hedef_skor == 30 ){
if ( hedef_skor == 5 ){
menu_additem(menu, "\wOYNANACAK TUR SAYISI \w [\r 5\w ]", "5",ADMIN_CVAR)
}
if ( hedef_skor == 10 ){
menu_additem(menu, "\wOYNANACAK TUR SAYISI \w [\r 10\w ]", "5",ADMIN_CVAR)
}
if ( hedef_skor == 15 ){
menu_additem(menu, "\wOYNANACAK TUR SAYISI \w [\r 15\w ]", "5",ADMIN_CVAR)
}
if ( hedef_skor == 20 ){
menu_additem(menu, "\wOYNANACAK TUR SAYISI \w [\r 20\w ]", "5",ADMIN_CVAR)
}
if ( hedef_skor == 25 ){
menu_additem(menu, "\wOYNANACAK TUR SAYISI \w [\r 25\w ]", "5",ADMIN_CVAR)
}
if ( hedef_skor == 30 ){
menu_additem(menu, "\wOYNANACAK TUR SAYISI \w [\r 30\w ]", "5",ADMIN_CVAR)
}
}
else
{
menu_additem(menu, "\wOYNANACAK TUR SAYISI \w [\r -\w ]", "5",ADMIN_CVAR)
}
}
else
{
menu_additem(menu, "\d------------------------", "5",ADMIN_CVAR)
}
menu_additem(menu, "\r AYARLARI KAYDET", "6",ADMIN_CVAR)
menu_setprop(menu, MPROP_NEXTNAME, "Ileri");
menu_setprop(menu, MPROP_BACKNAME, "Geri");
menu_setprop(menu, MPROP_EXITNAME, "Menuyu Kapat");
menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
new admin_name[32]
get_user_name(id , admin_name , 31 )
menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
menu_display(id, menu, 0);
}
else
{
ColorChat(id,NORMAL,"^4[^1 HARiTA DEGiSiM AYARLARI YUKLENiYOR. Lutfen Bekleyiniz ^4... ]")
}
}
else
{
ColorChat(id,NORMAL,"^1[ ^4 YETKiNiZ YETERLi DEGiL^3 ( ^1CVAR YETKiSi^3 )^1 ]")
}
}
public adminmenudevam(id, menu, item){
if( item == MENU_EXIT )
{
menu_destroy(menu);
return PLUGIN_HANDLED;
}
new data[6], iName[64];
new access, callback;
menu_item_getinfo(menu, item, access, data,5, iName, 63, callback);
new key = str_to_num(data);
switch(key)
{
case 1:{
if ( oyun_sonu_harita_oylamasi == 1 && oyun_sonu_restart == 1){
oyun_sonu_harita_oylamasi = 1
oyun_sonu_restart = 0
oylama_istegi = 1
client_cmd(id, "tur_sayac_menusu")
return PLUGIN_HANDLED
}
if ( oyun_sonu_harita_oylamasi == 1 && oyun_sonu_restart == 0){
oyun_sonu_harita_oylamasi = 0
client_cmd(id, "tur_sayac_menusu")
return PLUGIN_HANDLED
}
if ( oyun_sonu_harita_oylamasi == 0 && oyun_sonu_restart == 1){
oyun_sonu_harita_oylamasi = 1
oyun_sonu_restart = 0
oylama_istegi = 1
client_cmd(id, "tur_sayac_menusu")
return PLUGIN_HANDLED
}
if ( oyun_sonu_harita_oylamasi == 0 && oyun_sonu_restart == 0){
oyun_sonu_harita_oylamasi = 1
oylama_istegi = 1
client_cmd(id, "tur_sayac_menusu")
return PLUGIN_HANDLED
}
}
case 2:{
if ( oyun_sonu_harita_oylamasi == 1 && oyun_sonu_restart == 1){
oyun_sonu_harita_oylamasi = 0
oyun_sonu_restart = 1
oylama_istegi = 0
client_cmd(id, "tur_sayac_menusu")
return PLUGIN_HANDLED
}
if ( oyun_sonu_harita_oylamasi == 1 && oyun_sonu_restart == 0){
oyun_sonu_restart = 1
oyun_sonu_harita_oylamasi = 0
oylama_istegi = 0
client_cmd(id, "tur_sayac_menusu")
return PLUGIN_HANDLED
}
if ( oyun_sonu_harita_oylamasi == 0 && oyun_sonu_restart == 1){
oyun_sonu_restart = 0
oylama_istegi = 1
client_cmd(id, "tur_sayac_menusu")
return PLUGIN_HANDLED
}
if ( oyun_sonu_harita_oylamasi == 0 && oyun_sonu_restart == 0){
oyun_sonu_restart = 1
oylama_istegi = 0
client_cmd(id, "tur_sayac_menusu")
return PLUGIN_HANDLED
}
}
case 3: {
if ( bilgilendirme == 0 ){
bilgilendirme = 1
client_cmd(id, "tur_sayac_menusu")
return PLUGIN_HANDLED
}
if ( bilgilendirme == 1 ){
bilgilendirme = 2
client_cmd(id, "tur_sayac_menusu")
return PLUGIN_HANDLED
}
if ( bilgilendirme == 2 ){
bilgilendirme = 0
client_cmd(id, "tur_sayac_menusu")
return PLUGIN_HANDLED
}
}
case 4: {
if ( oyun_sonu_harita_oylamasi == 0 && oyun_sonu_restart == 0 ){
if ( oyun_suresi == 15 || oyun_suresi == 20 || oyun_suresi == 25 || oyun_suresi == 30 || oyun_suresi == 35 || oyun_suresi == 40 ){
if ( oyun_suresi == 15 ){
oyun_suresi = 20
console_cmd(id,"tur_sayac_menusu")
return PLUGIN_HANDLED
}
if ( oyun_suresi == 20 ){
oyun_suresi = 25
console_cmd(id,"tur_sayac_menusu")
return PLUGIN_HANDLED
}
if ( oyun_suresi == 25 ){
oyun_suresi = 30
console_cmd(id,"tur_sayac_menusu")
return PLUGIN_HANDLED
}
if ( oyun_suresi == 30 ){
oyun_suresi = 35
console_cmd(id,"tur_sayac_menusu")
return PLUGIN_HANDLED
}
if ( oyun_suresi == 35 ){
oyun_suresi = 40
console_cmd(id,"tur_sayac_menusu")
return PLUGIN_HANDLED
}
if ( oyun_suresi == 40 ){
oyun_suresi = 15
console_cmd(id,"tur_sayac_menusu")
return PLUGIN_HANDLED
}
}
else
{
oyun_suresi = 15
console_cmd(id,"tur_sayac_menusu")
return PLUGIN_HANDLED
}
}
else
{
console_cmd(id,"tur_sayac_menusu")
return PLUGIN_HANDLED
}
}
case 5: {
if ( oyun_sonu_harita_oylamasi == 1 || oyun_sonu_restart == 1 ){
if ( hedef_skor == 5 || hedef_skor == 10 || hedef_skor == 15 || hedef_skor == 20 || hedef_skor == 25 || hedef_skor == 30 ){
if ( hedef_skor == 5 ){
if ( ct_score + terrorist_score < 10 ){
hedef_skor = 10
console_cmd(id,"tur_sayac_menusu")
return PLUGIN_HANDLED
}
}
if ( hedef_skor == 10){
if ( ct_score + terrorist_score < 15 ){
hedef_skor = 15
console_cmd(id,"tur_sayac_menusu")
return PLUGIN_HANDLED
}
}
if ( hedef_skor == 15 ){
if ( ct_score + terrorist_score < 20 ){
hedef_skor = 20
console_cmd(id,"tur_sayac_menusu")
return PLUGIN_HANDLED
}
}
if ( hedef_skor == 20 ){
if ( ct_score + terrorist_score < 25 ){
hedef_skor = 25
console_cmd(id,"tur_sayac_menusu")
return PLUGIN_HANDLED
}
}
if ( hedef_skor == 25 ){
if ( ct_score + terrorist_score < 30 ){
hedef_skor = 30
console_cmd(id,"tur_sayac_menusu")
return PLUGIN_HANDLED
}
}
if ( hedef_skor == 30 ){
if ( ct_score + terrorist_score < 5 ){
hedef_skor = 5
console_cmd(id,"tur_sayac_menusu")
return PLUGIN_HANDLED
}
}
}
else
{
hedef_skor = 5
console_cmd(id,"tur_sayac_menusu")
return PLUGIN_HANDLED
}
}
else
{
console_cmd(id,"tur_sayac_menusu")
return PLUGIN_HANDLED
}
}
case 6: {
new Yazibir[13];
new Yaziuc[13];
new Yazidort[13];
new Yazibes[13];
new Yazialti[13];
new Yaziyedi[13];
formatex( Yazibir , charsmax( Yazibir ) , "%d" , oyun_sonu_restart );
formatex( Yaziuc , charsmax( Yaziuc ) , "%d" , bilgilendirme );
formatex( Yazidort , charsmax( Yazidort ) , "%d" , oyun_sonu_harita_oylamasi );
formatex( Yazibes , charsmax( Yazibes ) , "%d" , oyun_suresi );
formatex( Yazialti , charsmax( Yazialti ) , "%d" , hedef_skor );
formatex( Yaziyedi , charsmax( Yaziyedi ) , "%d" , oylama_istegi );
nvault_pset( Dosya , satirbir , Yazibir );
nvault_pset( Dosya , satiruc , Yaziuc );
nvault_pset( Dosya , satirdort , Yazidort );
nvault_pset( Dosya , satirbes , Yazibes );
nvault_pset( Dosya , satiralti , Yazialti );
nvault_pset( Dosya , satiryedi , Yaziyedi );
new degisim_yapan[32]
get_user_name(id , degisim_yapan , 31 )
ColorChat(id,NORMAL,"^4[ ^2Harita Degisim Sistemi ^4-->^1 Veriler Kaydedildi^4 ]")
ColorChat(0,NORMAL,"^4[ ^2 %s ^1ADLI ADMiN ^4HARiTA DEGiSiM SiSTEMi^1NDE DEGiSiKLiKLER YAPTI.^4 ]",degisim_yapan)
console_cmd(id,"tur_sayac_menusu")
}
}
menu_destroy(menu);
return PLUGIN_HANDLED;
}
public harita_degisme_islemi(id) {
set_task(5.0, "ClCmdVote");
client_cmd(0, "spk sound/buttons/bell1.wav")
set_task(1.0,"kazanan")
}
public kazanan(id) {
if ( ct_score == terrorist_score ){
ekran_mesaj_noktasi( 149,68,000, -1.0, -0.40, 10, 10.0, 10.0, 10.0, 10.0 );
ekran_mesaji(0,"OYUN BERABERE BiTTi");
}
if ( ct_score < terrorist_score ){
ekran_mesaj_noktasi( 255,0,0, -1.0, -0.40, 10, 10.0, 10.0, 10.0, 10.0 );
ekran_mesaji(0,"%s KAZANDI",T_isim_yardimci);
}
if ( ct_score > terrorist_score ){
ekran_mesaj_noktasi( 0,0,255, -1.0, -0.40, 10, 10.0, 10.0, 10.0, 10.0 );
ekran_mesaji(0,"%s KAZANDI",CT_isim_yardimci);
}
}
public team_score(){
new team[32];
read_data(1,team,31);
if (equal(team,"CT"))
{
ct_score = read_data(2);
}
else if (equal(team,"TERRORIST"))
{
terrorist_score = read_data(2);
}
}
public resle(id){
set_task(1.0,"kazanan")
client_cmd(0, "spk sound/buttons/bell1.wav")
}
public restart_mesaji(id){
ColorChat(id,NORMAL,"^1[ ****************************** ]")
ColorChat(id,NORMAL,"^1[ ****************************** ]")
ColorChat(id,NORMAL,"^1[ *** ^4 OTOMATiK RESTART UYGULANDI^1 *** ]")
ColorChat(id,NORMAL,"^1[ ****************************** ]")
ColorChat(id,NORMAL,"^1[ ****************************** ]")
}
public score_round(){
if ( zaman_islem == 0 ){
zaman_islem = 1
if (oyun_sonu_harita_oylamasi == 1){
server_cmd("amx_cvar mp_timelimit 0")
}
if (oyun_sonu_restart == 0 && oyun_sonu_harita_oylamasi == 0 ){
if (oyun_suresi == 15){
server_cmd("amx_cvar mp_timelimit 15")
}
if (oyun_suresi == 20){
server_cmd("amx_cvar mp_timelimit 20")
}
if (oyun_suresi == 25){
server_cmd("amx_cvar mp_timelimit 25")
}
if (oyun_suresi == 30){
server_cmd("amx_cvar mp_timelimit 30")
}
if (oyun_suresi == 35){
server_cmd("amx_cvar mp_timelimit 35")
}
if (oyun_suresi == 40){
server_cmd("amx_cvar mp_timelimit 40")
}
}
}
kalan_tur = hedef_skor - ct_score - terrorist_score
if ( kalan_tur < 1 ){ // [ OYUN BݔTݠ] <-- ށRTLAR
if ( oyun_sonu_islem == 0 ) {
oyun_sonu_islem = 1
if (oyun_sonu_harita_oylamasi == 1 ){ // [ OYUN BݔTݠ+ HARݔA OYLAMASI ] <-- ށRTLAR
set_task(0.1,"harita_degisme_islemi")
set_task(0.2,"kazanan")
set_task(5.2,"kazanan")
set_task(11.3,"kazanan")
}
if (oyun_sonu_restart == 1 ){ // [ OYUN BݔTݠ+ OTOMAT RESTART ] <-- ށRTLAR
server_cmd("amx_cvar sv_restart 10")
set_task(0.2,"kazanan")
set_task(1.2,"kazanan")
set_task(2.2,"kazanan")
set_task(4.2,"kazanan")
set_task(2.3,"restart_mesaji")
}
}
}
}
public yenitur_basladi( id ){
if ( bilgilendirme == 1){ // [ BGENDݒME ] <-- ށRTLAR
if (oyun_sonu_harita_oylamasi == 1 ){ // [ BGENDݒME + HARݔA OYLAMASI ] <-- ށRTLAR
if (oyun_sonu_restart == 0 ){ // [ BGENDݒME - OTOMAT RESTART ] <-- ށRTLAR
if ( kalan_tur == 1 ) { // [ SON TUR + BGENDݒME + HARݔA OYLAMASI ] <-- ށRTLAR
ColorChat(id,NORMAL,"^1[ ^4OYNANILAN HARiTA^3 :^1 %s",harita)
ColorChat(id,NORMAL,"^1[ ******************* ]")
ColorChat(id,NORMAL,"^1[ ***** ^4SON TUR^1 ***** ]")
ColorChat(id,NORMAL,"^1[ ******************* ]")
ColorChat(id,NORMAL,"^1[ ^4CT^1 --> %d ^4||^1 %d <-- ^4T^1]",ct_score,terrorist_score)
}
if ( kalan_tur >= 2 ) { // [ SON TUR DEНL + BGENDݒME + HARݔA OYLAMASI ] <-- ށRTLAR
ColorChat(id,NORMAL,"^1[ ^4OYNANILAN HARiTA^3 :^1 %s ]",harita)
ColorChat(id,NORMAL,"^1[ ******************* ]")
ColorChat(id,NORMAL,"^1[ ^4KALAN TUR SAYISI^1 : %d ]",kalan_tur-1)
ColorChat(id,NORMAL,"^1[ ******************* ]")
ColorChat(id,NORMAL,"^1[ ^4CT^1 --> %d ^4||^1 %d <-- ^4T^1 ]",ct_score,terrorist_score)
}
}
}
if (oyun_sonu_harita_oylamasi == 0 ){ // [ BGENDݒME - HARݔA OYLAMASI ] <-- ށRTLAR
if (oyun_sonu_restart == 1 ){ // [ BGENDݒME + OTOMAT RESTART ] <-- ށRTLAR
if ( kalan_tur == 1 ) { // [ BGENDݒME - HARݔA OYLAMASI + OTOMAT RESTART + SON TUR ] <-- ށRTLAR
ColorChat(id,NORMAL,"^1[ ^4OYNANILAN HARiTA^3 :^1 %s",harita)
ColorChat(id,NORMAL,"^1[ ******************* ]")
ColorChat(id,NORMAL,"^1[ ***** ^4SON TUR^1 ***** ]")
ColorChat(id,NORMAL,"^1[ ******************* ]")
ColorChat(id,NORMAL,"^1[ ^4CT^1 --> %d ^4||^1 %d <-- ^4T^1 ]",ct_score,terrorist_score)
}
if ( kalan_tur > 1 ) { // [ BGENDݒME - HARݔA OYLAMASI + OTOMAT RESTART + SON TUR DEНL ] <-- ށRTLAR
ColorChat(id,NORMAL,"^1[ ^4OYNANILAN HARiTA^3 :^1 %s ]",harita)
ColorChat(id,NORMAL,"^1[ ******************* ]")
ColorChat(id,NORMAL,"^1[ ^4KALAN TUR SAYISI^1 : %d ]",kalan_tur-1)
ColorChat(id,NORMAL,"^1[ ******************* ]")
ColorChat(id,NORMAL,"^1[ ^4CT^1 --> %d ^4||^1 %d <-- ^4T^1 ]",ct_score,terrorist_score)
}
}
}
if (oyun_sonu_harita_oylamasi == 0 ){ // [ BGENDݒME - HARݔA OYLAMASI ] <-- ށRTLAR
if (oyun_sonu_restart == 0 ){ // [ BGENDݒME - OTOMAT RESTART ] <-- ށRTLAR
ColorChat(id,NORMAL,"^1[ ******************* ]")
ColorChat(id,NORMAL,"^1[ ^4OYNANILAN HARiTA^3 :^1 %s ]",harita)
ColorChat(id,NORMAL,"^1[ ******************* ]")
ColorChat(id,NORMAL,"^1[ ^4CT^1 --> %d ^4||^1 %d <-- ^4T^1 ]",ct_score,terrorist_score)
ColorChat(id,NORMAL,"^1[ ******************* ]")
}
}
}
if ( bilgilendirme == 2){ // [ BGENDݒME ] <-- ށRTLAR
if (oyun_sonu_harita_oylamasi == 1 ){ // [ BGENDݒME + HARݔA OYLAMASI ] <-- ށRTLAR
if (oyun_sonu_restart == 0 ){ // [ BGENDݒME - OTOMAT RESTART ] <-- ށRTLAR
if ( kalan_tur == 1 ) { // [ SON TUR + BGENDݒME + HARݔA OYLAMASI ] <-- ށRTLAR
ekran_mesaj_noktasi( 000,255,000, -1.0, 0.21, 0, 0.5, 5.0, 0.5, 0.5)
ekran_mesaji(id,"OYNANILAN HARiTA");
ekran_mesaj_noktasi( 255,255,255, -1.0, 0.25, 0, 0.5, 5.0, 0.5, 0.5)
ekran_mesaji(id,"%s",harita);
ekran_mesaj_noktasi( 000,255,000, -1.0, 0.37, 0, 0.5, 5.0, 0.5, 0.5)
ekran_mesaji(id,"SON TUR");
ekran_mesaj_noktasi( 255,000,000, 0.25, 0.50, 0, 0.5, 5.0, 0.5, 0.5)
ekran_mesaji(id,"%s",T_isim_yardimci);
ekran_mesaj_noktasi( 255,255,255, 0.29, 0.54, 0, 0.5, 5.0, 0.5, 0.5)
ekran_mesaji(id,"%d",terrorist_score);
ekran_mesaj_noktasi( 000,000,255, 0.65, 0.50, 0, 0.5, 5.0, 0.5, 0.5)
ekran_mesaji(id,"%s",CT_isim_yardimci);
ekran_mesaj_noktasi( 255,255,255, 0.68, 0.54, 0, 0.5, 5.0, 0.5, 0.5)
ekran_mesaji(id,"%d",ct_score);
}
if ( kalan_tur >= 2 ) { // [ SON TUR DEНL + BGENDݒME + HARݔA OYLAMASI ] <-- ށRTLAR
ekran_mesaj_noktasi( 000,255,000, -1.0, 0.21, 0, 0.5, 5.0, 0.5, 0.5)
ekran_mesaji(id,"OYNANILAN HARiTA");
ekran_mesaj_noktasi( 255,255,255, -1.0, 0.25, 0, 0.5, 5.0, 0.5, 0.5)
ekran_mesaji(id,"%s",harita);
ekran_mesaj_noktasi( 000,255,000, -1.0, 0.35, 0, 0.5, 5.0, 0.5, 0.5)
ekran_mesaji(id,"KALAN TUR SAYISI",harita);
ekran_mesaj_noktasi( 255,255,255, -1.0, 0.39, 0, 0.5, 5.0, 0.5, 0.5)
ekran_mesaji(id,"%d",kalan_tur-1);
ekran_mesaj_noktasi( 255,000,000, 0.25, 0.50, 0, 0.5, 5.0, 0.5, 0.5)
ekran_mesaji(id,"%s",T_isim_yardimci);
ekran_mesaj_noktasi( 255,255,255, 0.29, 0.54, 0, 0.5, 5.0, 0.5, 0.5)
ekran_mesaji(id,"%d",terrorist_score);
ekran_mesaj_noktasi( 000,000,255, 0.65, 0.50, 0, 0.5, 5.0, 0.5, 0.5)
ekran_mesaji(id,"%s",CT_isim_yardimci);
ekran_mesaj_noktasi( 255,255,255, 0.68, 0.54, 0, 0.5, 5.0, 0.5, 0.5)
ekran_mesaji(id,"%d",ct_score);
}
}
}
if (oyun_sonu_harita_oylamasi == 0 ){ // [ BGENDݒME - HARݔA OYLAMASI ] <-- ށRTLAR
if (oyun_sonu_restart == 1 ){ // [ BGENDݒME + OTOMAT RESTART ] <-- ށRTLAR
if ( kalan_tur == 1 ) { // [ BGENDݒME - HARݔA OYLAMASI + OTOMAT RESTART + SON TUR ] <-- ށRTLAR
ekran_mesaj_noktasi( 000,255,000, -1.0, 0.21, 0, 0.5, 5.0, 0.5, 0.5)
ekran_mesaji(id,"OYNANILAN HARiTA");
ekran_mesaj_noktasi( 255,255,255, -1.0, 0.25, 0, 0.5, 5.0, 0.5, 0.5)
ekran_mesaji(id,"%s",harita);
ekran_mesaj_noktasi( 000,255,000, -1.0, 0.37, 0, 0.5, 5.0, 0.5, 0.5)
ekran_mesaji(id,"SON TUR");
ekran_mesaj_noktasi( 255,000,000, 0.25, 0.50, 0, 0.5, 5.0, 0.5, 0.5)
ekran_mesaji(id,"%s",T_isim_yardimci);
ekran_mesaj_noktasi( 255,255,255, 0.29, 0.54, 0, 0.5, 5.0, 0.5, 0.5)
ekran_mesaji(id,"%d",terrorist_score);
ekran_mesaj_noktasi( 000,000,255, 0.65, 0.50, 0, 0.5, 5.0, 0.5, 0.5)
ekran_mesaji(id,"%s",CT_isim_yardimci);
ekran_mesaj_noktasi( 255,255,255, 0.68, 0.54, 0, 0.5, 5.0, 0.5, 0.5)
ekran_mesaji(id,"%d",ct_score);
}
if ( kalan_tur > 1 ) { // [ BGENDݒME - HARݔA OYLAMASI + OTOMAT RESTART + SON TUR DEНL ] <-- ށRTLAR
ekran_mesaj_noktasi( 000,255,000, -1.0, 0.21, 0, 0.5, 5.0, 0.5, 0.5)
ekran_mesaji(id,"OYNANILAN HARiTA");
ekran_mesaj_noktasi( 255,255,255, -1.0, 0.25, 0, 0.5, 5.0, 0.5, 0.5)
ekran_mesaji(id,"%s",harita);
ekran_mesaj_noktasi( 000,255,000, -1.0, 0.35, 0, 0.5, 5.0, 0.5, 0.5)
ekran_mesaji(id,"KALAN TUR SAYISI",harita);
ekran_mesaj_noktasi( 255,255,255, -1.0, 0.39, 0, 0.5, 5.0, 0.5, 0.5)
ekran_mesaji(id,"%d",kalan_tur-1);
ekran_mesaj_noktasi( 255,000,000, 0.25, 0.50, 0, 0.5, 5.0, 0.5, 0.5)
ekran_mesaji(id,"%s",T_isim_yardimci);
ekran_mesaj_noktasi( 255,255,255, 0.29, 0.54, 0, 0.5, 5.0, 0.5, 0.5)
ekran_mesaji(id,"%d",terrorist_score);
ekran_mesaj_noktasi( 000,000,255, 0.65, 0.50, 0, 0.5, 5.0, 0.5, 0.5)
ekran_mesaji(id,"%s",CT_isim_yardimci);
ekran_mesaj_noktasi( 255,255,255, 0.68, 0.54, 0, 0.5, 5.0, 0.5, 0.5)
ekran_mesaji(id,"%d",ct_score);
}
}
}
if (oyun_sonu_harita_oylamasi == 0 ){ // [ BGENDݒME - HARݔA OYLAMASI ] <-- ށRTLAR
if (oyun_sonu_restart == 0 ){ // [ BGENDݒME - OTOMAT RESTART ] <-- ށRTLAR
ekran_mesaj_noktasi( 000,255,000, -1.0, 0.21, 0, 0.5, 5.0, 0.5, 0.5)
ekran_mesaji(id,"OYNANILAN HARiTA");
ekran_mesaj_noktasi( 255,255,255, -1.0, 0.25, 0, 0.5, 5.0, 0.5, 0.5)
ekran_mesaji(id,"%s",harita);
ekran_mesaj_noktasi( 255,000,000, 0.25, 0.50, 0, 0.5, 5.0, 0.5, 0.5)
ekran_mesaji(id,"%s",T_isim_yardimci);
ekran_mesaj_noktasi( 255,255,255, 0.29, 0.54, 0, 0.5, 5.0, 0.5, 0.5)
ekran_mesaji(id,"%d",terrorist_score);
ekran_mesaj_noktasi( 000,000,255, 0.65, 0.50, 0, 0.5, 5.0, 0.5, 0.5)
ekran_mesaji(id,"%s",CT_isim_yardimci);
ekran_mesaj_noktasi( 255,255,255, 0.68, 0.54, 0, 0.5, 5.0, 0.5, 0.5)
ekran_mesaji(id,"%d",ct_score);
}
}
}
}
public oynanilanharitalarinsirasi(id){
new suankimap[250];
get_mapname(suankimap,249);
ChatColor(id,"Oynanilan haritalarin sirasi; !team%s !y--> !team%s !y--> !team%s !y--> !team%s",ondanbirbironcekiharitacevir,ondanbironcekiharitacevir ,bironcekiharitacevir, suankimap);
}
public plugin_natives()
{
register_native("HaritaOyla", "ClCmdVote", 1) //Baþka eklentiler ile birleþtirmek i穮 native kullandým.
}
public Show_Nextmap(id)
{
new harita[32]
get_cvar_string("amx_nextmap",harita,sizeof(harita) - 1)
if(harita[0])
{
ChatColor(id, "!teamSonraki Harita: !g%s", harita)
}
else
ChatColor(id, "!teamSonraki Harita daha oylanmadi.")
}
public OylamaBaslatmak(id){
if(access(id,OYLAMA_BASLATMA_YETKiSi)){
new isim[35]
get_user_name(id,isim,35)
ChatColor(0,"!g %s !yADLI ADMiN !team HARiTA OYLAMASI !yBASLATTI.",isim);
set_task(5.0, "ClCmdVote");
}
else
{
ChatColor(id,"!teamHARiTA OYLAMASI !yBASLATABiLMEK ICIN YETERLi YETKiYE SAHiP DEGiLSiNiZ. !gGEREKLi YETKi !teamADMIN_MAP.");
}
}
public RoundEnd()
if(g_LastRound)
set_task(1.0, "changelevel");
public RockTheVote(id)
{
if ( oylama_istegi == 1 ) {
new iNum, szPlayers[32];
get_players(szPlayers, iNum, "hc")
if(g_Vote)
{
ChatColor(id, "!teamOYLAMA ISLEMi DEVAM EDiYOR.")
return PLUGIN_CONTINUE;
}
if(b_HasRTV[id])
{
ChatColor(id, "!teamSiz Zaten Bir Istek Gondermistiniz. !g %d !teamKadar Daha Kisinin Istegine Ihtiyacimiz var.",iNum-g_iNumRTV*10/7)
return PLUGIN_CONTINUE;
}
g_iNumRTV++;
b_HasRTV[id] = true;
if(g_iNumRTV*10/7 >= iNum)
{
ChatColor(0, "!teamOyuncularin!g %s 70!team 'i !teamHarita Degisimi Istegi Gonderdigi Icin !gHarita Oylamasi Baslatiliyor.",Sembol)
set_task(5.0, "ClCmdVote");
}
else
ChatColor(0, "!teamOylama icin !g%d !teamKisinin istegine ihtiyacimiz var !gsay /mapdegis", iNum-g_iNumRTV*10/7)
}
else
{
ChatColor(id, "!yHarita Degisimi Icin Gonderdiginiz Istek !teamREDDEDiLDi. !ySUANDA ISTEK ALMA ISLEMi KAPALI DURUMDA.")
}
return PLUGIN_HANDLED;
}
public LoadMapsInVote()
{
get_configsdir(configsdir,249);
new szMapName[ 64 ];
get_mapname( szMapName, 63 );
new satirsayisi,sonuc;
format(komutdosyasi,249,"%s/maps.ini",configsdir);
for(new i=0,deger;i<MAX_MAP;i++){
sonuc = read_file(komutdosyasi,i,SmiLe[i],249,satirsayisi);
if(sonuc != 0){
CSmiLeFaCee++;
CSmiLeFaCe[CSmiLeFaCee] = SmiLe[i];
deger++;}
}
}
public ClCmdVote(){
client_cmd(0, "spk sound/harita_oylama_sesi.wav")
set_cvar_float("mp_timelimit", 0.0)
startvote()
new yazi[256]
format(yazi, 255,"Harita Oylama Zamani[%d Saniye]^n",TimeVote-10)
set_task(1.0, "ValueVote", _, _, _, "a", 10);
}
public ValueVote()
{
new yazi[256]
format(yazi, 255,"Harita Oylama Zamani[%d Saniye]^n",TimeVote-10)
static timer = 10
timer--
switch(timer)
{
case 0:
{
bilgilendirme = 0
ChatColor(0, "!teamHarita oylamasi !gAKTIF")
g_Vote = true;
FaCe[0] = 0;
FaCe[1] = 0;
FaCe[2] = 0;
FaCe[3] = 0;
FaCe[4] = 0;
arrayset(FaCe, 0, sizeof(FaCe));
arrayset(g_iTimerVote, TimeVote-10, 33);
arrayset(b_HasAlreadyVoted, false, 33);
set_task(float(TimeVote)-5, "endvote");
timer = 10;
set_cvar_string("amx_nextmap", "[Oylamada]");
}
case 1:
{
ChatColor(0, "!teamHarita oylamasinin baslamasina !g%d saniye..", timer)
for(new q; q < 5; q++)
{
format(yazi, 255,"%s^n%d. %s [ %s %d]",yazi,q+1, CSmiLeFaCe[LeFa[q]],Sembol, FaCe[q] * g_iPlayerProcc)
}
format(yazi, 255,"%s^n^nGeçerli oy sayisi [%d]",yazi,iAllVoted)
}
case 2:
{
ChatColor(0, "!teamHarita oylamasinin baslamasina !g%d saniye..", timer)
for(new q; q < 4; q++)
{
format(yazi, 255,"%s^n%d. %s [ %s %d]",yazi,q+1, CSmiLeFaCe[LeFa[q]],Sembol, FaCe[q] * g_iPlayerProcc)
}
format(yazi, 255,"%s^n^n^nGeçerli oy sayisi [%d]",yazi,iAllVoted)
}
case 3:
{
ChatColor(0, "!teamHarita oylamasinin baslamasina !g%d saniye..", timer)
for(new q; q < 3; q++)
{
format(yazi, 255,"%s^n%d. %s [ %s %d]",yazi,q+1, CSmiLeFaCe[LeFa[q]],Sembol, FaCe[q] * g_iPlayerProcc)
}
format(yazi, 255,"%s^n^n^n^nGeçerli oy sayisi [%d]",yazi,iAllVoted)
}
case 4:
{
ChatColor(0, "!teamHarita oylamasinin baslamasina !g%d saniye..", timer)
for(new q; q < 2; q++)
{
format(yazi, 255,"%s^n%d. %s [ %s %d]",yazi,q+1, CSmiLeFaCe[LeFa[q]],Sembol, FaCe[q] * g_iPlayerProcc)
}
format(yazi, 255,"%s^n^n^n^n^nGeçerli oy sayisi [%d]",yazi,iAllVoted)
}
case 5:
{
ChatColor(0, "!teamHarita oylamasinin baslamasina !g%d saniye..", timer)
for(new q; q < 1; q++)
{
format(yazi, 255,"%s^n%d. %s [ %s %d]",yazi,q+1, CSmiLeFaCe[LeFa[q]],Sembol, FaCe[q] * g_iPlayerProcc)
}
format(yazi, 255,"%s^n^n^n^n^n^nGeçerli oy sayisi [%d]",yazi,iAllVoted)
}
default:
{
ChatColor(0, "!teamHarita oylamasinin baslamasina !g%d saniye..", timer)
}
}
}
public startvote()
{
CSmiLeFaCee = 0;
LoadMapsInVote()
new suankimap[250];
get_mapname(suankimap,249);
if(CSmiLeFaCee >= 6){
LeFa[0] = random_num(1,CSmiLeFaCee);
LeFa[1] = random_num(1,CSmiLeFaCee);
LeFa[2] = random_num(1,CSmiLeFaCee);
LeFa[3] = random_num(1,CSmiLeFaCee);
LeFa[4] = random_num(1,CSmiLeFaCee);
for(new i = 0;i<5;i++){
for(new j = 0;j<5;j++){
if(i == j)
continue;
if(LeFa[i] == LeFa[j] || equal(CSmiLeFaCe[LeFa[i]],suankimap) || equal(CSmiLeFaCe[LeFa[i]],bironcekiharitacevir) || equal(CSmiLeFaCe[LeFa[i]],ondanbironcekiharitacevir)){
LeFa[i] = random_num(1,CSmiLeFaCee); // ||
i = 0;}
}
}
}
return PLUGIN_HANDLED;
}
public changelevel()
{
set_cvar_float("mp_timelimit", 0.0);
ekran_mesaj_noktasi( 0,255,0, -1.0, -0.40, 0, 11.0, 6.0, 0.1, 1.5 )
ekran_mesaji(0, "^nHarita %s olarak degistiriliyor", CSmiLeFaCe[sonuc])
new iNum, szPlayers[32];
get_players(szPlayers, iNum)
for(new i; i < iNum; i++)
{
client_cmd(szPlayers[i], "drop;wait;wait;wait;wait;wait;drop;wait;wait;wait;wait;wait;drop");
set_pev(szPlayers[i], pev_flags, pev(szPlayers[i], pev_flags) | FL_FROZEN)
}
set_task(3.5, "changelevel1");
set_task(6.0, "changelevel2");
}
public changelevel1()
{
new _modName[10]
get_modname(_modName, 9)
if (!equal(_modName, "zp"))
{
message_begin(MSG_ALL, SVC_INTERMISSION)
message_end()
}
}
public changelevel2()
{
server_cmd("changelevel %s", CSmiLeFaCe[sonuc]);
}
public client_PreThink(id)
{
if(!g_Vote)
return;
if(g_iTimerVote[id] <= -1)
return;
if(iAllVoted)
g_iPlayerProcc = 100 / iAllVoted;
else
g_iPlayerProcc = 0;
if((get_gametime() - g_iLastSec[id]) >= 1.0)
if(g_iTimerVote[id] != 0){
g_iTimerVote[id]--, ChooseMap(id), g_iLastSec[id] = get_gametime();
}
else
{
show_menu(id, 0, "^n"), g_iTimerVote[id] = -1;
}
}
stock ChatColor(const id, const input[], any:...)
{
new count = 1, players[32]
static msg[191]
vformat(msg, 190, input, 3)
format(msg, sizeof(msg), "%s", msg)
replace_all(msg, 190, "!g", "^4")
replace_all(msg, 190, "!y", "^1")
replace_all(msg, 190, "!team", "^3")
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();
}
}
}
}
/// HUD MESSAGE ///
#if defined _dhudmessage_included
#endinput
#endif
#define _dhudmessage_included
stock __dhud_color;
stock __dhud_x;
stock __dhud_y;
stock __dhud_effect;
stock __dhud_fxtime;
stock __dhud_holdtime;
stock __dhud_fadeintime;
stock __dhud_fadeouttime;
stock __dhud_reliable;
stock ekran_mesaj_noktasi( red = 0, green = 160, blue = 0, Float:x = -1.0, Float:y = 0.65, effects = 2, Float:fxtime = 6.0, Float:holdtime = 3.0, Float:fadeintime = 0.1, Float:fadeouttime = 1.5, bool:reliable = false )
{
#define clamp_byte(%1) ( clamp( %1, 0, 255 ) )
#define pack_color(%1,%2,%3) ( %3 + ( %2 << 8 ) + ( %1 << 16 ) )
__dhud_color = pack_color( clamp_byte( red ), clamp_byte( green ), clamp_byte( blue ) );
__dhud_x = _:x;
__dhud_y = _:y;
__dhud_effect = effects;
__dhud_fxtime = _:fxtime;
__dhud_holdtime = _:holdtime;
__dhud_fadeintime = _:fadeintime;
__dhud_fadeouttime = _:fadeouttime;
__dhud_reliable = _:reliable;
return 1;
}
stock ekran_mesaji( index, const message[], any:... )
{
new buffer[ 128 ];
new numArguments = numargs();
if( numArguments == 2 )
{
send_dhudMessage( index, message );
}
else if( index || numArguments == 3 )
{
vformat( buffer, charsmax( buffer ), message, 3 );
send_dhudMessage( index, buffer );
}
else
{
new playersList[ 32 ], numPlayers;
get_players( playersList, numPlayers, "ch" );
if( !numPlayers )
{
return 0;
}
new Array:handleArrayML = ArrayCreate();
for( new i = 2, j; i < numArguments; i++ )
{
if( getarg( i ) == LANG_PLAYER )
{
while( ( buffer[ j ] = getarg( i + 1, j++ ) ) ) {}
j = 0;
if( GetLangTransKey( buffer ) != TransKey_Bad )
{
ArrayPushCell( handleArrayML, i++ );
}
}
}
new size = ArraySize( handleArrayML );
if( !size )
{
vformat( buffer, charsmax( buffer ), message, 3 );
send_dhudMessage( index, buffer );
}
else
{
for( new i = 0, j; i < numPlayers; i++ )
{
index = playersList[ i ];
for( j = 0; j < size; j++ )
{
setarg( ArrayGetCell( handleArrayML, j ), 0, index );
}
vformat( buffer, charsmax( buffer ), message, 3 );
send_dhudMessage( index, buffer );
}
}
ArrayDestroy( handleArrayML );
}
return 1;
}
stock send_dhudMessage( const index, const message[] )
{
message_begin( __dhud_reliable ? ( index ? MSG_ONE : MSG_ALL ) : ( index ? MSG_ONE_UNRELIABLE : MSG_BROADCAST ), SVC_DIRECTOR, _, index );
{
write_byte( strlen( message ) + 31 );
write_byte( DRC_CMD_MESSAGE );
write_byte( __dhud_effect );
write_long( __dhud_color );
write_long( __dhud_x );
write_long( __dhud_y );
write_long( __dhud_fadeintime );
write_long( __dhud_fadeouttime );
write_long( __dhud_holdtime );
write_long( __dhud_fxtime );
write_string( message );
}
message_end();
}
/// INCLUDE HUDMESSAGE BiTTi
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1055\\ f0\\ fs16 \n\\ par }
*/