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

Before mapchange "hooking"


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Ratonel
Member
Join Date: Jul 2012
Location: Romania
Old 09-15-2014 , 13:41   Before mapchange "hooking"
Reply With Quote #1

I need to do some stuff 5 minutes before mapchange.

Is there another way to do this, besides get_timeleft() every minute?
Ratonel is offline
aron9forever
Veteran Member
Join Date: Feb 2013
Location: Rromania
Old 09-15-2014 , 18:24   Re: Before mapchange "hooking"
Reply With Quote #2

um, well, yes and no
if you're confident admins are not gonna mess around with mp_timelimit and there are also no plugins that do that, then you can just check for value of the cvar at plugin_init and set a long task with timelimit - 5 for example
__________________
Meanwhile, in 2050:
Quote:
Originally Posted by aron9forever
useless small optimizations
Quote:
Originally Posted by Black Rose View Post
On a map that is 512x512x128 units you end up with 3,355,443,200,000 different "positions". To store each one of those positions individually in the variable "user_or" you need 12 terabytes of memory.
aron9forever is offline
alan_el_more
Veteran Member
Join Date: Jul 2008
Location: amxmodx-es.com
Old 09-15-2014 , 19:16   Re: Before mapchange "hooking"
Reply With Quote #3

Flag "d"
https://forums.alliedmods.net/showthread.php?t=51098
__________________
alan_el_more is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 09-15-2014 , 19:20   Re: Before mapchange "hooking"
Reply With Quote #4

Quote:
Originally Posted by alan_el_more View Post
That plugin is not related.
__________________
fysiks is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 09-16-2014 , 03:37   Re: Before mapchange "hooking"
Reply With Quote #5

Use set_task with Flag d
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
Ratonel
Member
Join Date: Jul 2012
Location: Romania
Old 09-16-2014 , 05:28   Re: Before mapchange "hooking"
Reply With Quote #6

So, this should work...

Code:
set_task(300, "DoStuff", 0, "", 0, "d")

Thanks for your replies.
Ratonel 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 17:32.


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