takım değiştirme
Moderatör: Moderatörler
-
Konu Sahibi - Mesajlar: 12
- Kayıt: Pzt Tem 02, 2018 11:05 pm
takım değiştirme
Beyler 15 El olunca otomatik t ile ct takımlarının yerlerini değiştirecek bir plugin varsa yardımcı olurmusunuz ?
Link: | |
Linklerini gizle |
-
Yasaklı Üye
- Mesajlar: 1089
- Kayıt: Cum Ara 22, 2017 6:14 pm
- Konum: Konum yok
- Server Ip/DNS: cs.gokturkgaming.com
- Clan İsmi: ɢoĸтυrĸ
- İletişim:
takım değiştirme
Kod: Tümünü seç
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <hamsandwich>
#define PLUGIN "Auto Map Changer"
#define VERSION "1.0"
#define AUTHOR "A"
#define TASK_NOTIFICATION 1546
new round;
new vote[3];
new nextmap[32];
new menu
new szMap1[32],szMap2[32],szMap3[32];
new const mapcycle[] = "addons/amxmodx/configs/mapcycle_csgo.ini";
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
if(!file_exists(mapcycle)) {
new f = fopen(mapcycle,"wt")
fclose(f)
}
register_event("HLTV","eNewRound","a","1=0","2=0")
register_event("TextMsg","eRestart","a","2=#Game_will_restart_in","2=#Game_Commencing")
}
public eNewRound() {
round++
if(round == 16) {
swap_msg()
}
public eRestart() {
round = 0
}
// TEAM SWAP
public swap_msg() {
set_task(6.0,"swap_teams")
ColorChat(0,"^3 5^4 SANIYE ICINDE ^3TAKIMLAR DEGISECEK")
ColorChat(0,"^3 5^4 SANIYE ICINDE ^3TAKIMLAR DEGISECEK")
ColorChat(0,"^3 5^4 SANIYE ICINDE ^3TAKIMLAR DEGISECEK")
ColorChat(0,"^3 5^4 SANIYE ICINDE ^3TAKIMLAR DEGISECEK")
ColorChat(0,"^3 5^4 SANIYE ICINDE ^3TAKIMLAR DEGISECEK")
ColorChat(0,"^3 5^4 SANIYE ICINDE ^3TAKIMLAR DEGISECEK")
}
public swap_teams() {
new players[32],inum;
get_players(players,inum)
for(new i;i<inum;i++) {
switch(i) {
case 0..6: set_task(0.1,"delayed_team_change",players[i])
case 7..14: set_task(0.2,"delayed_team_change",players[i])
case 15..22: set_task(0.3,"delayed_team_change",players[i])
case 23..31: set_task(0.4,"delayed_team_change",players[i])
}
}
set_task(1.0,"SendNotification")
}
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 SendNotification() {
set_hudmessage(0,255,0,-1.0,0.0,5,12.0,5.0);
show_hudmessage(0,"Takimlar Yer Degistirdi.");
}
/
public vote_finish() {
menu_destroy(menu)
if(vote[0] >= vote[1] && vote[0] >= vote[2]) {
formatex(nextmap,31,szMap1)
}
else if(vote[1] >= vote[0] && vote[1] >= vote[2]) {
formatex(nextmap,31,szMap2)
}
else if(vote[2] >= vote[0] && vote[2] >= vote[1]) {
formatex(nextmap,31,szMap3)
}
ColorChat(0,"^4*** Sonraki Map Oylamasi Bitti. Secilen Map: ^3%s",nextmap)
return PLUGIN_HANDLED
}
stock random_num2( _min, _max, exception1, exception2 = -1, exception3 = -1) {
new num = random_num(_min,_max)
while(num == exception1 || num == exception2 || num == exception3) {
num = random_num(_min,_max)
}
return num
}
Link: | |
Linklerini gizle |