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

Solved [ H3LP ] Detecting available player classes


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
DarthMan
Veteran Member
Join Date: Aug 2011
Old 12-25-2018 , 08:29   [ H3LP ] Detecting available player classes
Reply With Quote #1

Merry Christmas ! I don't know if anyone got any ideas about how it can be done, but I'm still asking it anyways. So, in TFC (Team Fortress Classic) there are up to 4 teams: blue, red, yellow and green. Most maps have 2 maps and fun maps usually only 1 team. Some maps like hunted have 3 teams. So each of these teams can have either some or all classes enabled. On KeyValue it reads the keys and values. The corresponding keys for class limitation from info_tfdetect entity are maxammo_shells, maxammo_nails, maxammo_rockets and maxammo_cells. For example, the flag for disabling scout is 1, 2 for sniper and 4 for soldier. If, for example, maxammo_shells is set to 7, that means that the 3 classes that I listed are not selectable from the class selection menu, only the rest of the classes. maxammo_shells corresponds to blue team by the way. What I need to know is how I can detect if 7 contains 1, 2 and 4 using PAWN AMXX, because it looks like the way u disable classes is by gathering the flags.
Here are the flags just in case:
Code:
enum {     FLAG_ONLY_CIVI = -1,     FLAG_NO_SCOUT = 1,     FLAG_NO_SNIPER = 2,     FLAG_NO_SOLDIER = 4,     FLAG_NO_DEMOMAN = 8,     FLAG_NO_MEDIC = 16,     FLAG_NO_HWGUY = 32,     FLAG_NO_PYRO = 64,     FLAG_NO_RCLASS = 128,     FLAG_NO_SPY = 256,     FLAG_NO_ENGINEER = 512 };

As you can see, each value is a multiple of 2.
Thanks !

Last edited by DarthMan; 12-25-2018 at 12:09. Reason: Solved
DarthMan is offline
 



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 03:27.


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