Raised This Month: $51 Target: $400
 12% 

Solved Help with a minor modification in MultiCFG Scripting


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
vijayar
Senior Member
Join Date: Sep 2020
Old 02-12-2021 , 05:26   Help with a minor modification in MultiCFG Scripting
Reply With Quote #1

Need help with this plugin - https://github.com/dadeppa/multicfg-deathmatch

At present this MultiCFG plugin gives alert of "Changing Game Mode to..." in the last 10 sec prior to next game mode change, when used with H3bus's DM Advance Plugin.

I am trying to introduce a remaining time, alert message, of the current round that is in progress, once when around 1 minute of the current game mode is left, before the last 10 sec message kicks in to change to the next game mode.

I have inserted the following code - to display remaining time left in current game mode, for e.g here from 65th to 60th sec - to effect this.

PHP Code:
  if(iCurrentGameTime <= 65 && iCurrentGameTime >= 60)
    {
        
char sAdvertMessage[255];
        
        
Format(sAdvertMessagesizeof(sAdvertMessage), "<font color='#ff0000'>Game Mode</font>\n <font color='#66ff66'>%s</font> ending in <font color='#66ff66'>%i</font> seconds"sCurrentGameNameiCurrentGameTime)        
    
        if(
iCurrentGameTime >= 60)
        {
            
PrintHintTextToAll(sAdvertMessage);
        }
    } 
The remaining time message correctly gets displayed at the 65th second with this inserted code, timer counts down in sync with the Game timer till the 60th second, however post that the message stays static with 60th second displayed for another 3-4 secs before it is removed.

Instead of displaying "Remaining time for game mode xx secs" from 65th sec to 60th second it continues till 56th sec but with the display stopped at 60th.

I have tried all combinations of adjusting iCurrentgametime values & range but this additional 4 sec countdown seems to get added in all scenarios and a static Hint Message display persists for those 4 secs.

Request if anyone can look at the code and help me correct this. I have attached the modified scripting file
Attached Files
File Type: sp Get Plugin or Get Source (MultiCFG-DM_mod.sp - 61 views - 5.6 KB)

Last edited by vijayar; 02-17-2021 at 07:11. Reason: SOLVED
vijayar is offline
vijayar
Senior Member
Join Date: Sep 2020
Old 02-17-2021 , 07:10   Re: Help with a minor modification in MultiCFG Scripting
Reply With Quote #2

figured out to circumvent this issue in a different way !
vijayar 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 07:42.


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