Raised This Month: $ Target: $400
 0% 

[CSGO] Get actual Round Time


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Fireflasch7
Junior Member
Join Date: Feb 2015
Old 09-13-2015 , 05:52   [CSGO] Get actual Round Time
Reply With Quote #1

Hey,
i have a question how to get the Roundtime that is on the Server so i can say: When its the time past and only 5 minutes left. Do anything?
Thank you very much
Regards Fireflasch7
Fireflasch7 is offline
nhnkl159
Senior Member
Join Date: Jul 2012
Location: Israel 3>
Old 09-13-2015 , 06:23   Re: [CSGO] Get actual Round Time
Reply With Quote #2

you can create timer..

hook round start like this :

Quote:
public OnPluginStart()
{
HookEvent("round_start", Round_Start);
}
and do :
Quote:
public Action:Round_Start(Handle:event, const String:name[], bool:dontBroadcast)
{
CreateTimer(300.0, Timerfivemin);

}
And Timer :

Quote:
public Action Timerfivemin(Handle:timer)
{
// do something
}
__________________

Last edited by nhnkl159; 09-13-2015 at 06:23.
nhnkl159 is offline
Send a message via Skype™ to nhnkl159
Fireflasch7
Junior Member
Join Date: Feb 2015
Old 09-13-2015 , 13:15   Re: [CSGO] Get actual Round Time
Reply With Quote #3

ok thank you ver much
Fireflasch7 is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 09-14-2015 , 11:16   Re: [CSGO] Get actual Round Time
Reply With Quote #4

GameRules_GetProp("m_iRoundTime");
Mitchell is offline
nhnkl159
Senior Member
Join Date: Jul 2012
Location: Israel 3>
Old 09-14-2015 , 12:09   Re: [CSGO] Get actual Round Time
Reply With Quote #5

Quote:
Originally Posted by Mitchell View Post
GameRules_GetProp("m_iRoundTime");
@_@

Why To Not Use :
Code:
new Float:RoundTime;
And
Code:
RoundTime = GetEngineTime();
And
Code:
if ( GetEngineTime() - RoundTime > 300.0 )
{
//do something
}
__________________

Last edited by nhnkl159; 09-14-2015 at 12:10.
nhnkl159 is offline
Send a message via Skype™ to nhnkl159
Mitchell
~lick~
Join Date: Mar 2010
Old 09-14-2015 , 12:19   Re: [CSGO] Get actual Round Time
Reply With Quote #6

Quote:
Originally Posted by nhnkl159 View Post
@_@

Why To Not Use :
Code:
new Float:RoundTime;
And
Code:
RoundTime = GetEngineTime();
And
Code:
if ( GetEngineTime() - RoundTime > 300.0 )
{
//do something
}
because that would be more lines to accomplish the same thing? Plus this returns the exact time that it shows the other clients on their huds.
Mitchell 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 14:32.


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