Raised This Month: $32 Target: $400
 8% 

[Request] AUTO restart round if player enter


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
MeliMeli
Senior Member
Join Date: Apr 2022
Location: Brazil
Old 02-07-2023 , 16:08   [Request] AUTO restart round if player enter
Reply With Quote #1

I searched every corner of the world, the multiverse and did not find such a plugin. The server will restart with countdown if a new player enter the server. If you have only 1 player on the server and another player enters, the count for a new round will begin and all rounds/frags and etc will be reset. Can someone do it?
MeliMeli is offline
bigdaddy424
Senior Member
Join Date: Oct 2021
Location: Jupiter
Old 02-08-2023 , 12:04   Re: [Request] AUTO restart round if player enter
Reply With Quote #2

Whenever someone joins the enemy team and its just you two, Game Commencing message will show up and stats/round/money will reset, if you're talking about counter-strike, unless its another game
__________________
bigdaddy424 is offline
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 02-24-2023 , 11:32   Re: [Request] AUTO restart round if player enter
Reply With Quote #3

Code:
/*CS/CZ restart round mono-to-duo, Idea by: MeliMeli*/ #include amxmodx #define  PLUGIN   "Restarting Round" #define  VERSION  "1.0.3" #define  AUTHOR   "SPiNX" #define MAX_PLAYERS 32 new g_zombies new bool:bRestarted, Xcvar_bot; new bool:bBot[MAX_PLAYERS +1]; new const SzCMD[]="sv_restartround 2" public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)     Xcvar_bot=register_cvar("mp_two_bot", "1")     /*Zombie leave as 1 to fix round to include bots.*/ } public client_putinserver(id) {     bBot[id] = is_user_bot(id) ? true : false     if(bBot[id] && get_pcvar_num(Xcvar_bot) || !bBot[id] && !get_pcvar_num(Xcvar_bot))     {         g_zombies++         if(g_zombies  == 2 && !bRestarted)         {             bRestarted = true             console_cmd( 0, SzCMD )             console_cmd( 0, "say ^"%s, %s by %s.^"", PLUGIN, VERSION, AUTHOR )         }     } } public client_disconnected(id) {     if(bBot[id] && get_pcvar_num(Xcvar_bot) || !bBot[id] && !get_pcvar_num(Xcvar_bot))     {         g_zombies--         if(g_zombies < 2 && bRestarted)         bRestarted   = false     } }
__________________

Last edited by DJEarthQuake; 03-06-2023 at 07:18. Reason: remove command
DJEarthQuake is offline
MeliMeli
Senior Member
Join Date: Apr 2022
Location: Brazil
Old 02-24-2023 , 22:24   Re: [Request] AUTO restart round if player enter
Reply With Quote #4

thank you, I will test it today for some reason when 2 players are on the same team the event #Game Commecing is not hooked, only if 1 player is TR and the other CT

i'll see if this fixes
MeliMeli is offline
ChillerX
Member
Join Date: Dec 2022
Old 02-24-2023 , 23:19   Re: [Request] AUTO restart round if player enter
Reply With Quote #5

The simpler approach would be to use either an auto team join cvar or plugin (or team limit cvar).

Last edited by ChillerX; 02-24-2023 at 23:27.
ChillerX is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 23:38.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode