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

Help / Support Remove Countdown when infection appears


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Catalinn
Junior Member
Join Date: Aug 2023
Old 08-22-2023 , 10:28   Remove Countdown when infection appears
Reply With Quote #1

How could I make the countdown disappear if an infection or any game mode appears? I tried it with an if in the native zp_has_round_started but it doesn't convince me, I think there is a simpler way than putting an if to all publics

PD: I solved it in the following way:

PHP Code:
public event_round_start()
{
    
remove_task()
    
    
set_task(5.0,"countdown")
}

public 
logevent_round_end()
{
    
remove_task()
}

public 
zp_user_infected_post()
{
    
remove_task()

With this the countdown is eliminated in any mode or infection or at the end of the round or restart, my only question now is if it is the best way and if it is mandatory to add an id to the task?
Attached Files
File Type: sma Get Plugin or Get Source (zp_extra_addon_countdownn.sma - 58 views - 5.0 KB)

Last edited by Catalinn; 08-22-2023 at 22:10. Reason: Solved
Catalinn is offline
Reply


Thread Tools
Display Modes

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 21:39.


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