RSSy MYGO.pl Opublikowano Sierpień 23, 2021 o 04:23 RSSy Udostępnij Opublikowano Sierpień 23, 2021 o 04:23 Hi good day! Hope everyone is coping during the pandemic times. I was wondering if this would matter: ***I run latest YapB in my server and I want to add and kick bots every X*** 1. (could be every certain rounds - e.g. every 7th, 15th, 28th round) 2. (could be every X server running time - e.g. every 7 mins or every 15 mins.) 3. (can be modified how many bots are kicked and how many bots are added during X) Is this possible? Tried doing these: PHP Code: #include <amxmodx> #include <cstrike> #define PLUGIN "addkick" #define VERSION "1.0" #define AUTHOR "nobody" #define MSGID 81045 #if !defined MAX_PLAYERS const MAX_PLAYERS = 32; #endif enum _:ePlayerInfo { iTotalPlayers, iCtPlayers, iCtAlive, iTerPlayers, iTerAlive }; new iInfo[ePlayerInfo]; public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR); } public client_putinserver(id) { iInfo[iTotalPlayers]++; if(!task_exists(MSGID)) { set_task(10.0, "displayMessage", MSGID); } } #if AMXX_VERSION_NUM < 183 public client_disconnect(id) #else public client_disconnected(id) #endif { if( get_user_team( id ) == 2 ) iInfo[ iCtPlayers ]-- else if( get_user_team( id ) == 1 ) iInfo[ iTerPlayers ]-- if(iInfo[ iCtPlayers ] + iInfo[ iTerPlayers ] == 8 ) { remove_task(MSGID); server_cmd("yb kick"); } } -- in the 1st script above, my trial goal is to kick a bot when ct / t players are equivalent to 8 players combined. However nothing happens. What can be the problem? ------------------------------------------------------------ PHP Code: #include < amxmodx > #include < cstrike > #include < fakemeta > #define PLUGIN "AddKick" #define VERSION "1.0" #define AUTHOR "nobody" public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR); } public New_Round( id ) { static iRoundCount ++iRoundCount if(iRoundCount == 2) // Restart on the 2nd round { //iRoundCount = 0 server_cmd("yb kick") server_cmd("yb kick") server_cmd("yb kick") } } public New_Round2( id ) { static iRoundCount ++iRoundCount if(iRoundCount == 15) // Restart on the 15th round { iRoundCount = 0 server_cmd("yb add 4 1 5") } } public New_Round3( id ) { static iRoundCount ++iRoundCount if(iRoundCount == 18) // Restart on the 18th round { iRoundCount = 0 server_cmd("yb add 4 1 5") server_cmd("yb add 4 1 5") server_cmd("yb add 4 1 5") } } public New_Round4( id ) { static iRoundCount ++iRoundCount if(iRoundCount == 21) // Restart on the 21st round { iRoundCount = 0 server_cmd("yb kick") server_cmd("yb kick") } } public New_Round5( id ) { static iRoundCount ++iRoundCount if(iRoundCount == 24) // Restart on the 24th round { iRoundCount = 0 server_cmd("yb kick") } } -- in the 2nd script I am doing, it aims to add or kick bots during X rounds, which is more easier. But still nothing happens in-game. What do I lack? LOOKING FORWARD! Thank you! :) Przeczytaj cały wpis Odnośnik do komentarza Udostępnij na innych stronach Więcej opcji udostępniania...
Rekomendowane odpowiedzi