Raised This Month: $ Target: $400
 0% 

[Help] Set a timer/countdown


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
KuvZz
Member
Join Date: Sep 2013
Location: Spain
Old 10-01-2015 , 11:47   [Help] Set a timer/countdown
Reply With Quote #1

Hi guys, I would to know how to set a timer/countdown (this aren't the correct words lol)
I mean, for expample:
PHP Code:
set_user_gravity(id400)
//after 5 seconds
set_user_gravity(id800
__________________
KuvZz is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 10-01-2015 , 12:25   Re: [Help] Set a timer/countdown
Reply With Quote #2

PHP Code:
set_user_gravity(id400)
set_task(5.0"user_gravity"id)

public 
user_gravity(id)
    
set_user_gravity(id800
PS - This is not how the gravity function is used. Use 1.0 for 800 and 0.5 for 400.

Last edited by OciXCrom; 10-01-2015 at 12:26.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
KuvZz
Member
Join Date: Sep 2013
Location: Spain
Old 10-01-2015 , 12:48   Re: [Help] Set a timer/countdown
Reply With Quote #3

Yeah, thanks. I forgot the set_task lol
And you are right, btw gravity is the example but thanks

PS: Tested and works (I think you forget a { )
__________________

Last edited by KuvZz; 10-01-2015 at 13:01.
KuvZz is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 10-01-2015 , 12:52   Re: [Help] Set a timer/countdown
Reply With Quote #4

Quote:
Originally Posted by OciXCrom View Post
PHP Code:
set_user_gravity(id400)
set_task(5.0"user_gravity"id)

public 
user_gravity(id)
    
set_user_gravity(id800
PS - This is not how the gravity function is used. Use 1.0 for 800 and 0.5 for 400.
Or divide by sv_gravity cvar value.
__________________
HamletEagle is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 10-01-2015 , 14:35   Re: [Help] Set a timer/countdown
Reply With Quote #5

Quote:
Originally Posted by KuvZz View Post
PS: Tested and works (I think you forget a { )
There's no need to use it when the function has only one line. Just hit TAB.

Last edited by OciXCrom; 10-01-2015 at 14:35.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 10-01-2015 , 14:42   Re: [Help] Set a timer/countdown
Reply With Quote #6

Quote:
Originally Posted by OciXCrom View Post
There's no need to use it when the function has only one line. Just hit TAB.
But it's okay to put { } even with only one line.
__________________
HamletEagle is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 10-01-2015 , 17:50   Re: [Help] Set a timer/countdown
Reply With Quote #7

Yes, I'm aware od that, but I prefer using TAB instead. However, there's no big difference.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
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 05:42.


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