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

how to make Timer For match ....


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Dr.Mohammad
Senior Member
Join Date: Jan 2016
Location: CSGO Servers
Old 08-23-2017 , 10:55   how to make Timer For match ....
Reply With Quote #1

hi guys
i need timer for timeout in match csgo.
how to make timer ?

i read in page but i can not make timer.
https://wiki.alliedmods.net/Timers_(SourceMod_Scripting)


please help.

make for example:
PHP Code:
public timeout
{
.
.
.
.
if (!
PausesLimitReachedCT())
{
  ---------  
timer for one minutes here -------
  ---------  if (
timer 0) { goto public end timeout } ---------
  ---------  
ServerCommand("sm_csay Counter Terrorist Time out for % Secound"timer); --------
  
PrintToChatAll("[\x07SMP\x01] \x06Timeout at freezetime called by %s"CaptainName_CT);
  
ServerCommand("mp_pause_match");
  
TotalPausesCT++;
  return 
Plugin_Handled;
}
.
.
.
}

public 
end timeout
{
.
.
.

srry for bad speak english

Last edited by Dr.Mohammad; 08-23-2017 at 11:18.
Dr.Mohammad is offline
ambn
Veteran Member
Join Date: Feb 2015
Location: Fun servers
Old 08-23-2017 , 12:06   Re: how to make Timer For match ....
Reply With Quote #2

If you would like to create a timer you can just use the function CreateTimer(float time, Handle iTimer) and you's might be like this:
PHP Code:
CreateTimer(60.0Timer_PauseHandle); 
and you need to fill it's Action with your code:
PHP Code:
public Action Timer_PauseHandle(Handle iTimer)
{
    
//Your Code

and you can ever return Plugin_Stop to break the timer if needed.
__________________
ambn 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 01:53.


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