⭐🚀 TkyNET | Blacklist ve Profesyonel DDoS Korumalı TeamSpeak 3 Sunucuları 🚀⭐
🇹🇷 TR Lokasyon | 🛡️ Gelişmiş DDoS Koruması | ⚡ Düşük Ping | 🎧 Kesintisiz TS3 | Hostlar
Webailesi.comWebailesi.com

Round sayısına ulaşıldığında otomatik restart ve takımların yer değiştirilmesi.

Konu

#1
Merhaba toplam 25 round'a ulaşıldığında otomatik olarak restart atılmasını ve takımların yer değiştirilmesini istiyorum.

Bununla ilgili yardımcı olabilecek var mı?
#2
https://webailesi.com/konu-plugin-30-round-olunca-restart-atma-272
PHP Kod:
    if(Round >= 30
Sma içinden 30 yazan yeri kaç yaparsanız gün o sayı olunca rr atar.
Son Düzenleme: 07-08-2020, 17:17, Düzenleyen: scuro.
#3
Pardon ama burda otomatik restart var round sayısına ulaşıldığında. Bu eklenti bende mevcut.
Benim istediğim round sayısına ulaşıldığında hem takımlar yer değiştirecek, hem restart atacak.
#4
ReAPI Kütüphanesi İle;
PHP Kod:
/* Sublime AMXX Editor v2.2 */

#include <amxmodx>
#include <reapi>
new iL_Round
public plugin_init() {
    
register_plugin("Bir Eklenti""1.0""PawNod'")

    
register_logevent("pRE"2"1=Round_End");
}
public 
pRE(iP_ID) {
    
iL_Round++
    if(
iL_Round >= 30) {
        for(new 
i3i++) {
            
Renkli_Yazi(0"^1[^3BOT^1] ^4Round Sayisi^3 30 ^4Oldugu Icin ^3Restart ^4Atiliyor...");
        }
        
server_cmd("amx_cvar sv_restart 3");
        
rg_swap_all_players();
        
iL_Round 0
    
}
}
stock Renkli_Yazi(const ID, const input[], any:...)
{
    new 
Count 1Players[32];
    static 
Message[191];
    
vformat(Message190input3);
    
    
/* ^1 | ^x01 --> Yellow */
    /* ^4 | ^x04 --> Green */
    /* ^3 | ^x03 --> Team Color */
        
    
replace_all(Message190"^1""^x01");
    
replace_all(Message190"^4""^x04");
    
replace_all(Message190"^3""^x03");
    
    switch(
AMXX_VERSION_NUM)
    {
        case 
182 :
        {
            if(
IDPlayers[0] = ID; else get_players(PlayersCount"ch");
            {
                for(new 
0Counti++)
                {
                    if(
is_user_connected(Players[i]))
                    {
                        
message_begin(MSG_ONE_UNRELIABLEget_user_msgid("SayText"), _Players[i]);
                        
write_byte(Players[i]);
                        
write_string(Message);
                        
message_end();
                    }
                }
            }
        }
        case 
183 :
        {    
            
client_print_color(IDIDMessage);
        }
        default :
        {
            
client_print(IDprint_chatMessage);
        }
    }
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ ansicpg1254\\ deff0\\ deflang1055{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ f0\\ fs16 \n\\ par }
*/ 
Cstrike Kütüphanesi İle;

PHP Kod:
/* Sublime AMXX Editor v2.2 */

#include <amxmodx>
#include <cstrike>
new iL_Round
public plugin_init() {
    
register_plugin("Bir Eklenti""1.0""PawNod'")

    
register_logevent("pRE"2"1=Round_End");
}
public 
pRE(iP_ID) {
    
iL_Round++
    if(
iL_Round >= 30) {
        for(new 
i3i++) {
            
Renkli_Yazi(0"^1[^3BOT^1] ^4Round Sayisi^3 30 ^4Oldugu Icin ^3Restart ^4Atiliyor...");
        }
        
server_cmd("amx_cvar sv_restart 3");
        new 
pOyuncular[32],pSayi,pUID;
        
get_players(pOyuncular,pSayi);
        for(new 
ipSayii++){
            
pUID pOyuncular[i];
            new 
pTakim get_user_team(pUID);
            switch(
pTakim){
                case 
: {
                    
cs_set_user_team(pUID,2);
                }
                case 
: {
                    
cs_set_user_team(pUID,1);
                }
            }
        }
        
iL_Round 0
    
}
}
stock Renkli_Yazi(const ID, const input[], any:...)
{
    new 
Count 1Players[32];
    static 
Message[191];
    
vformat(Message190input3);
    
    
/* ^1 | ^x01 --> Yellow */
    /* ^4 | ^x04 --> Green */
    /* ^3 | ^x03 --> Team Color */
        
    
replace_all(Message190"^1""^x01");
    
replace_all(Message190"^4""^x04");
    
replace_all(Message190"^3""^x03");
    
    switch(
AMXX_VERSION_NUM)
    {
        case 
182 :
        {
            if(
IDPlayers[0] = ID; else get_players(PlayersCount"ch");
            {
                for(new 
0Counti++)
                {
                    if(
is_user_connected(Players[i]))
                    {
                        
message_begin(MSG_ONE_UNRELIABLEget_user_msgid("SayText"), _Players[i]);
                        
write_byte(Players[i]);
                        
write_string(Message);
                        
message_end();
                    }
                }
            }
        }
        case 
183 :
        {    
            
client_print_color(IDIDMessage);
        }
        default :
        {
            
client_print(IDprint_chatMessage);
        }
    }
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ ansicpg1254\\ deff0\\ deflang1055{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ f0\\ fs16 \n\\ par }
*/ 
#5
(07-08-2020, 17:57)PawNod\ Adlı Kullanıcıdan Alıntı: ReAPI Kütüphanesi İle;
PHP Kod:
/* Sublime AMXX Editor v2.2 */

#include <amxmodx>
#include <reapi>
new iL_Round
public plugin_init() {
    
register_plugin("Bir Eklenti""1.0""PawNod'")

    
register_logevent("pRE"2"1=Round_End");
}
public 
pRE(iP_ID) {
    
iL_Round++
    if(
iL_Round >= 30) {
        for(new 
i3i++) {
            
Renkli_Yazi(0"^1[^3BOT^1] ^4Round Sayisi^3 30 ^4Oldugu Icin ^3Restart ^4Atiliyor...");
        }
        
server_cmd("amx_cvar sv_restart 3");
        
rg_swap_all_players();
        
iL_Round 0
    
}
}
stock Renkli_Yazi(const ID, const input[], any:...)
{
    new 
Count 1Players[32];
    static 
Message[191];
    
vformat(Message190input3);
    
    
/* ^1 | ^x01 --> Yellow */
    /* ^4 | ^x04 --> Green */
    /* ^3 | ^x03 --> Team Color */
        
    
replace_all(Message190"^1""^x01");
    
replace_all(Message190"^4""^x04");
    
replace_all(Message190"^3""^x03");
    
    switch(
AMXX_VERSION_NUM)
    {
        case 
182 :
        {
            if(
IDPlayers[0] = ID; else get_players(PlayersCount"ch");
            {
                for(new 
0Counti++)
                {
                    if(
is_user_connected(Players[i]))
                    {
                        
message_begin(MSG_ONE_UNRELIABLEget_user_msgid("SayText"), _Players[i]);
                        
write_byte(Players[i]);
                        
write_string(Message);
                        
message_end();
                    }
                }
            }
        }
        case 
183 :
        {    
            
client_print_color(IDIDMessage);
        }
        default :
        {
            
client_print(IDprint_chatMessage);
        }
    }
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ ansicpg1254\\ deff0\\ deflang1055{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ f0\\ fs16 \n\\ par }
*/ 
Cstrike Kütüphanesi İle;

PHP Kod:
/* Sublime AMXX Editor v2.2 */

#include <amxmodx>
#include <cstrike>
new iL_Round
public plugin_init() {
    
register_plugin("Bir Eklenti""1.0""PawNod'")

    
register_logevent("pRE"2"1=Round_End");
}
public 
pRE(iP_ID) {
    
iL_Round++
    if(
iL_Round >= 30) {
        for(new 
i3i++) {
            
Renkli_Yazi(0"^1[^3BOT^1] ^4Round Sayisi^3 30 ^4Oldugu Icin ^3Restart ^4Atiliyor...");
        }
        
server_cmd("amx_cvar sv_restart 3");
        new 
pOyuncular[32],pSayi,pUID;
        
get_players(pOyuncular,pSayi);
        for(new 
ipSayii++){
            
pUID pOyuncular[i];
            new 
pTakim get_user_team(pUID);
            switch(
pTakim){
                case 
: {
                    
cs_set_user_team(pUID,2);
                }
                case 
: {
                    
cs_set_user_team(pUID,1);
                }
            }
        }
        
iL_Round 0
    
}
}
stock Renkli_Yazi(const ID, const input[], any:...)
{
    new 
Count 1Players[32];
    static 
Message[191];
    
vformat(Message190input3);
    
    
/* ^1 | ^x01 --> Yellow */
    /* ^4 | ^x04 --> Green */
    /* ^3 | ^x03 --> Team Color */
        
    
replace_all(Message190"^1""^x01");
    
replace_all(Message190"^4""^x04");
    
replace_all(Message190"^3""^x03");
    
    switch(
AMXX_VERSION_NUM)
    {
        case 
182 :
        {
            if(
IDPlayers[0] = ID; else get_players(PlayersCount"ch");
            {
                for(new 
0Counti++)
                {
                    if(
is_user_connected(Players[i]))
                    {
                        
message_begin(MSG_ONE_UNRELIABLEget_user_msgid("SayText"), _Players[i]);
                        
write_byte(Players[i]);
                        
write_string(Message);
                        
message_end();
                    }
                }
            }
        }
        case 
183 :
        {    
            
client_print_color(IDIDMessage);
        }
        default :
        {
            
client_print(IDprint_chatMessage);
        }
    }
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ ansicpg1254\\ deff0\\ deflang1055{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ f0\\ fs16 \n\\ par }
*/ 
Yazılardan bir şey anlamadım. sma dosyası var ise atar mısınız hızlıca kurmamız için.
#6
buyur isimleri sen değişirsin bu arada reapi ve cstrike bunların 2 sinide kullanmican 2 sinden birini kullanıcan tavsiyem reapi halini kullan
.smareapiile.sma(Dosya Boyutu: 1,91 KB | İndirme Sayısı: 74)

.smacstrikeile.sma(Dosya Boyutu: 2,31 KB | İndirme Sayısı: 7)
#7
(07-08-2020, 20:19)mrkeremy Adlı Kullanıcıdan Alıntı:
(07-08-2020, 17:57)PawNod\ Adlı Kullanıcıdan Alıntı: ReAPI Kütüphanesi İle;
PHP Kod:
/* Sublime AMXX Editor v2.2 */

#include <amxmodx>
#include <reapi>
new iL_Round
public plugin_init() {
    
register_plugin("Bir Eklenti""1.0""PawNod'")

    
register_logevent("pRE"2"1=Round_End");
}
public 
pRE(iP_ID) {
    
iL_Round++
    if(
iL_Round >= 30) {
        for(new 
i3i++) {
            
Renkli_Yazi(0"^1[^3BOT^1] ^4Round Sayisi^3 30 ^4Oldugu Icin ^3Restart ^4Atiliyor...");
        }
        
server_cmd("amx_cvar sv_restart 3");
        
rg_swap_all_players();
        
iL_Round 0
    
}
}
stock Renkli_Yazi(const ID, const input[], any:...)
{
    new 
Count 1Players[32];
    static 
Message[191];
    
vformat(Message190input3);
    
    
/* ^1 | ^x01 --> Yellow */
    /* ^4 | ^x04 --> Green */
    /* ^3 | ^x03 --> Team Color */
        
    
replace_all(Message190"^1""^x01");
    
replace_all(Message190"^4""^x04");
    
replace_all(Message190"^3""^x03");
    
    switch(
AMXX_VERSION_NUM)
    {
        case 
182 :
        {
            if(
IDPlayers[0] = ID; else get_players(PlayersCount"ch");
            {
                for(new 
0Counti++)
                {
                    if(
is_user_connected(Players[i]))
                    {
                        
message_begin(MSG_ONE_UNRELIABLEget_user_msgid("SayText"), _Players[i]);
                        
write_byte(Players[i]);
                        
write_string(Message);
                        
message_end();
                    }
                }
            }
        }
        case 
183 :
        {    
            
client_print_color(IDIDMessage);
        }
        default :
        {
            
client_print(IDprint_chatMessage);
        }
    }
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ ansicpg1254\\ deff0\\ deflang1055{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ f0\\ fs16 \n\\ par }
*/ 
Cstrike Kütüphanesi İle;

PHP Kod:
/* Sublime AMXX Editor v2.2 */

#include <amxmodx>
#include <cstrike>
new iL_Round
public plugin_init() {
    
register_plugin("Bir Eklenti""1.0""PawNod'")

    
register_logevent("pRE"2"1=Round_End");
}
public 
pRE(iP_ID) {
    
iL_Round++
    if(
iL_Round >= 30) {
        for(new 
i3i++) {
            
Renkli_Yazi(0"^1[^3BOT^1] ^4Round Sayisi^3 30 ^4Oldugu Icin ^3Restart ^4Atiliyor...");
        }
        
server_cmd("amx_cvar sv_restart 3");
        new 
pOyuncular[32],pSayi,pUID;
        
get_players(pOyuncular,pSayi);
        for(new 
ipSayii++){
            
pUID pOyuncular[i];
            new 
pTakim get_user_team(pUID);
            switch(
pTakim){
                case 
: {
                    
cs_set_user_team(pUID,2);
                }
                case 
: {
                    
cs_set_user_team(pUID,1);
                }
            }
        }
        
iL_Round 0
    
}
}
stock Renkli_Yazi(const ID, const input[], any:...)
{
    new 
Count 1Players[32];
    static 
Message[191];
    
vformat(Message190input3);
    
    
/* ^1 | ^x01 --> Yellow */
    /* ^4 | ^x04 --> Green */
    /* ^3 | ^x03 --> Team Color */
        
    
replace_all(Message190"^1""^x01");
    
replace_all(Message190"^4""^x04");
    
replace_all(Message190"^3""^x03");
    
    switch(
AMXX_VERSION_NUM)
    {
        case 
182 :
        {
            if(
IDPlayers[0] = ID; else get_players(PlayersCount"ch");
            {
                for(new 
0Counti++)
                {
                    if(
is_user_connected(Players[i]))
                    {
                        
message_begin(MSG_ONE_UNRELIABLEget_user_msgid("SayText"), _Players[i]);
                        
write_byte(Players[i]);
                        
write_string(Message);
                        
message_end();
                    }
                }
            }
        }
        case 
183 :
        {    
            
client_print_color(IDIDMessage);
        }
        default :
        {
            
client_print(IDprint_chatMessage);
        }
    }
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ ansicpg1254\\ deff0\\ deflang1055{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ f0\\ fs16 \n\\ par }
*/ 
Yazılardan bir şey anlamadım. sma dosyası var ise atar mısınız hızlıca kurmamız için.
Efendim şöyle anlatayım, reapi halindeki eklenti daha optimizedir ve serveri yormaz. Sebebi ise az satır kullanılmasıdır.
Arkadaşın reapi diye yazdığı o renkli kodları kopyalayıp masaüstüne bir sma dosyası oluşturunuz. O kopyaladağınız kodları oraya yapıştırıp serverinize kurunuz.
Sma dosyası nasıl oluşturulur derseniz de masaüstüne sağ tıklayıp yeni metin belgesi oluşturun. O dosyanının türünü değiştiriniz.
#8
Konunuz çözüldü ise belirtiniz.
#9
(08-08-2020, 01:15)suriyelikene Adlı Kullanıcıdan Alıntı: Konunuz çözüldü ise belirtiniz.
Konu çözülmüştür. Çok teşekkürler
#10
Konunuz "Çözülmüş İsteklere" taşınmıştır.
Linksta

Bir hesap oluşturun veya yorum yapmak için giriş yapın

Yorum yapmak için üye olmanız gerekiyor

ya da
Task