Raised This Month: $ Target: $400
 0% 

Spawn protection timer


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
akcaliberg
Senior Member
Join Date: Nov 2011
Location: Istanbul
Old 12-21-2014 , 12:24   Re: Spawn protection timer
Reply With Quote #1

You need to set a task to make a timer. For example:

PHP Code:
public StartTimer(param[1]) {
    
    if(!
param[0]) {
        
// Time's up
        
return PLUGIN_HANDLED
    
}
    
    
// Set hud message
    // Show hud message
    
    
param[0]--;
    
set_task(1.0,"StartTimer",_,param,sizeof(param));    

And if you want to start the timer you need to give it a start point.

PHP Code:
new param[1];
param[0] = get_cvar_num("mp_freezetime") + get_cvar_num("sp_time");
StartTimer(param); 

Last edited by akcaliberg; 12-21-2014 at 12:24.
akcaliberg 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 15:17.


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