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

detecting HL2DM game type


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Grrrrrrrrrrrrrrrrrrr
Senior Member
Join Date: Oct 2007
Old 10-26-2009 , 13:54   detecting HL2DM game type
Reply With Quote #1

Hi,

How does a script detect if the HL2DM game type is Free For All Deathmatch or Team Deathmatch? please show me an example.
__________________
Note: "r" letters = 19 ; CHEESE: I LIKE CHOCOLATE MILK
Grrrrrrrrrrrrrrrrrrr is offline
Send a message via AIM to Grrrrrrrrrrrrrrrrrrr
berni
SourceMod Plugin Approver
Join Date: May 2007
Location: Austria
Old 10-26-2009 , 18:34   Re: detecting HL2DM game type
Reply With Quote #2

Code:
new Handle:mp_teamplay = FindConVar("mp_teamplay");

if (mp_teamplay != INVALID_HANDLE) {
   if (GetConVarBool(mp_teamplay)) {
    // It's teamplay
   }
   else {
    // It isn't
  }
}
__________________
Why reinvent the wheel ? Download smlib with over 350 useful functions.

When people ask me "Plz" just because it's shorter than "Please" I feel perfectly justified to answer "No" because it's shorter than "Yes"
powered by Core i7 3770k | 32GB DDR3 1886Mhz | 2x Vertex4 SSD Raid0

Last edited by berni; 10-26-2009 at 18:36.
berni 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:09.


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