Raised This Month: $32 Target: $400
 8% 

[TF2] How to tell when map/players are in "Setup" for Payload


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Haytil
Junior Member
Join Date: Oct 2018
Old 10-22-2018 , 16:58   [TF2] How to tell when map/players are in "Setup" for Payload
Reply With Quote #1

In sourcemod, how can I check to see if the current map/round is in the "setup" phase of a payload (i.e., when red team is in their starting 60 seconds to build teleporters, sentries, etc.).

I've tried looking around, but "setup" is a very unfriendly google term to search for...
Haytil is offline
PC Gamer
Veteran Member
Join Date: Mar 2014
Old 10-22-2018 , 17:53   Re: [TF2] How to tell when map/players are in "Setup" for Payload
Reply With Quote #2

This may help...

1. List of TF2 Events: https://wiki.alliedmods.net/Team_Fortress_2_Events
2. Discussion on Round Start event: https://forums.alliedmods.net/showthread.php?t=67705
PC Gamer is offline
nosoop
Veteran Member
Join Date: Aug 2014
Old 10-22-2018 , 20:02   Re: [TF2] How to tell when map/players are in "Setup" for Payload
Reply With Quote #3

tf2_morestocks has a decent amount of extra functionality.

The specific snippet you want is TF2_IsSetupTime.
__________________
I do TF2, TF2 servers, and TF2 plugins.
I don't do DMs over Discord -- PM me on the forums regarding inquiries.
AlliedModders Releases / Github / TF2 Server / Donate (BTC / BCH / coffee)
nosoop is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 10-22-2018 , 20:02   Re: [TF2] How to tell when map/players are in "Setup" for Payload
Reply With Quote #4

The gamerules object can tell you both if a map is payload/payload race and if it's in setup.

PHP Code:
#define PAYLOAD 3

if (GameRules_GetProp("m_nGameType") == PAYLOAD && GameRules_GetProp("m_bInSetup"))
{
    
// This is setup for a payload or payload race map

__________________
Not currently working on SourceMod plugin development.

Last edited by Powerlord; 10-22-2018 at 20:03.
Powerlord is offline
Reply


Thread Tools
Display Modes

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 10:21.


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