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ı?
Konu
https://webailesi.com/konu-plugin-30-round-olunca-restart-atma-272
Sma içinden 30 yazan yeri kaç yaparsanız gün o sayı olunca rr atar.
PHP Kod:
if(Round >= 30)
Son Düzenleme: 07-08-2020, 17:17, Düzenleyen: scuro.
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.
Benim istediğim round sayısına ulaşıldığında hem takımlar yer değiştirecek, hem restart atacak.
ReAPI Kütüphanesi İle;
Cstrike 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 i; i < 3; i++) {
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 = 1, Players[32];
static Message[191];
vformat(Message, 190, input, 3);
/* ^1 | ^x01 --> Yellow */
/* ^4 | ^x04 --> Green */
/* ^3 | ^x03 --> Team Color */
replace_all(Message, 190, "^1", "^x01");
replace_all(Message, 190, "^4", "^x04");
replace_all(Message, 190, "^3", "^x03");
switch(AMXX_VERSION_NUM)
{
case 182 :
{
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(Message);
message_end();
}
}
}
}
case 183 :
{
client_print_color(ID, ID, Message);
}
default :
{
client_print(ID, print_chat, Message);
}
}
}
/* 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 }
*/
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 i; i < 3; i++) {
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 i; i < pSayi; i++){
pUID = pOyuncular[i];
new pTakim = get_user_team(pUID);
switch(pTakim){
case 1 : {
cs_set_user_team(pUID,2);
}
case 2 : {
cs_set_user_team(pUID,1);
}
}
}
iL_Round = 0
}
}
stock Renkli_Yazi(const ID, const input[], any:...)
{
new Count = 1, Players[32];
static Message[191];
vformat(Message, 190, input, 3);
/* ^1 | ^x01 --> Yellow */
/* ^4 | ^x04 --> Green */
/* ^3 | ^x03 --> Team Color */
replace_all(Message, 190, "^1", "^x01");
replace_all(Message, 190, "^4", "^x04");
replace_all(Message, 190, "^3", "^x03");
switch(AMXX_VERSION_NUM)
{
case 182 :
{
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(Message);
message_end();
}
}
}
}
case 183 :
{
client_print_color(ID, ID, Message);
}
default :
{
client_print(ID, print_chat, Message);
}
}
}
/* 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 }
*/
(07-08-2020, 17:57)PawNod\ Adlı Kullanıcıdan Alıntı: ReAPI Kütüphanesi İle;Yazılardan bir şey anlamadım. sma dosyası var ise atar mısınız hızlıca kurmamız için.Cstrike 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 i; i < 3; i++) {
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 = 1, Players[32];
static Message[191];
vformat(Message, 190, input, 3);
/* ^1 | ^x01 --> Yellow */
/* ^4 | ^x04 --> Green */
/* ^3 | ^x03 --> Team Color */
replace_all(Message, 190, "^1", "^x01");
replace_all(Message, 190, "^4", "^x04");
replace_all(Message, 190, "^3", "^x03");
switch(AMXX_VERSION_NUM)
{
case 182 :
{
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(Message);
message_end();
}
}
}
}
case 183 :
{
client_print_color(ID, ID, Message);
}
default :
{
client_print(ID, print_chat, Message);
}
}
}
/* 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 }
*/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 i; i < 3; i++) {
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 i; i < pSayi; i++){
pUID = pOyuncular[i];
new pTakim = get_user_team(pUID);
switch(pTakim){
case 1 : {
cs_set_user_team(pUID,2);
}
case 2 : {
cs_set_user_team(pUID,1);
}
}
}
iL_Round = 0
}
}
stock Renkli_Yazi(const ID, const input[], any:...)
{
new Count = 1, Players[32];
static Message[191];
vformat(Message, 190, input, 3);
/* ^1 | ^x01 --> Yellow */
/* ^4 | ^x04 --> Green */
/* ^3 | ^x03 --> Team Color */
replace_all(Message, 190, "^1", "^x01");
replace_all(Message, 190, "^4", "^x04");
replace_all(Message, 190, "^3", "^x03");
switch(AMXX_VERSION_NUM)
{
case 182 :
{
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(Message);
message_end();
}
}
}
}
case 183 :
{
client_print_color(ID, ID, Message);
}
default :
{
client_print(ID, print_chat, Message);
}
}
}
/* 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 }
*/
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
(07-08-2020, 20:19)mrkeremy Adlı Kullanıcıdan Alıntı:Efendim şöyle anlatayım, reapi halindeki eklenti daha optimizedir ve serveri yormaz. Sebebi ise az satır kullanılmasıdır.(07-08-2020, 17:57)PawNod\ Adlı Kullanıcıdan Alıntı: ReAPI Kütüphanesi İle;Yazılardan bir şey anlamadım. sma dosyası var ise atar mısınız hızlıca kurmamız için.Cstrike 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 i; i < 3; i++) {
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 = 1, Players[32];
static Message[191];
vformat(Message, 190, input, 3);
/* ^1 | ^x01 --> Yellow */
/* ^4 | ^x04 --> Green */
/* ^3 | ^x03 --> Team Color */
replace_all(Message, 190, "^1", "^x01");
replace_all(Message, 190, "^4", "^x04");
replace_all(Message, 190, "^3", "^x03");
switch(AMXX_VERSION_NUM)
{
case 182 :
{
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(Message);
message_end();
}
}
}
}
case 183 :
{
client_print_color(ID, ID, Message);
}
default :
{
client_print(ID, print_chat, Message);
}
}
}
/* 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 }
*/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 i; i < 3; i++) {
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 i; i < pSayi; i++){
pUID = pOyuncular[i];
new pTakim = get_user_team(pUID);
switch(pTakim){
case 1 : {
cs_set_user_team(pUID,2);
}
case 2 : {
cs_set_user_team(pUID,1);
}
}
}
iL_Round = 0
}
}
stock Renkli_Yazi(const ID, const input[], any:...)
{
new Count = 1, Players[32];
static Message[191];
vformat(Message, 190, input, 3);
/* ^1 | ^x01 --> Yellow */
/* ^4 | ^x04 --> Green */
/* ^3 | ^x03 --> Team Color */
replace_all(Message, 190, "^1", "^x01");
replace_all(Message, 190, "^4", "^x04");
replace_all(Message, 190, "^3", "^x03");
switch(AMXX_VERSION_NUM)
{
case 182 :
{
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(Message);
message_end();
}
}
}
}
case 183 :
{
client_print_color(ID, ID, Message);
}
default :
{
client_print(ID, print_chat, Message);
}
}
}
/* 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 }
*/
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.
Benzer Konular
Yorum
1.106
Okunma
08-02-2026, 13:09
Yorum
2.882
Okunma
)


