• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Solved Tfs 2.9 Flags

the flags starts at 0
2^0 = 1

as you can see, the first flag of any ot is always 1
so, try 2^(n-1)

in your case:
2^22 + 2^32

and btw, to add new flags you must edit the sources...
 
Thx but that dont work propertly on my server and yes i know i need to edite source to att new flags(already done that.
PlayerFlag_CannotUseCombat = 0 is the first 2^0 and thats 1 because it cant be 0 else all people cant use combat. so the next one PlayerFlag_CannotAttackPlayer is 2 next 4 and so on. but when i but them i want togetter they still dont work.

I tried 2^(n-1) like this 2^22 + 2^32 on everyone i wanted but still all dont work. i have no idea why but here are them, all my flags
Code:
        PlayerFlag_CannotUseCombat = 0,        //2^0 = 1
	PlayerFlag_CannotAttackPlayer,         //2^1 = 2
	PlayerFlag_CannotAttackMonster,        //2^2 = 4
	PlayerFlag_CannotBeAttacked,           //2^3 = 8
	PlayerFlag_CanConvinceAll,             //2^4 = 16
	PlayerFlag_CanSummonAll,               //2^5 = 32
	PlayerFlag_CanIllusionAll,             //2^6 = 64
	PlayerFlag_CanSenseInvisibility,       //2^7 = 128
	PlayerFlag_IgnoredByMonsters,          //2^8 = 256
	PlayerFlag_NotGainInFight,             //2^9 = 512
	PlayerFlag_HasInfiniteMana,            //2^10 = 1024
	PlayerFlag_HasInfiniteSoul,            //2^11 = 2048
	PlayerFlag_HasNoExhaustion,            //2^12 = 4096
	PlayerFlag_CannotUseSpells,            //2^13 = 8192
	PlayerFlag_CannotPickupItem,           //2^14 = 16384
	PlayerFlag_CanAlwaysLogin,             //2^15 = 32768
	PlayerFlag_CanBroadcast,               //2^16 = 65536
	PlayerFlag_CanEditHouses,              //2^17 = 131072
	PlayerFlag_CannotBeBanned,             //2^18 = 262144
	PlayerFlag_CannotBePushed,             //2^19 = 524288
	PlayerFlag_HasInfiniteCapacity,        //2^20 = 1048576
	PlayerFlag_CanPushAllCreatures,        //2^21 = 2097152
	PlayerFlag_CanTalkRedPrivate,          //2^22 = 4194304
	PlayerFlag_CanTalkRedChannel,          //2^23 = 8388608
	PlayerFlag_TalkOrangeHelpChannel,      //2^24 = 16777216
	PlayerFlag_NotGainExperience,          //2^25 = 33554432
	PlayerFlag_NotGainMana,                //2^26 = 67108864
	PlayerFlag_NotGainHealth,              //2^27 = 134217728
	PlayerFlag_NotGainSkill,               //2^28 = 268435456
	PlayerFlag_SetMaxSpeed,                //2^29 = 536870912
	PlayerFlag_SpecialVIP,                 //2^30 = 1073741824
	PlayerFlag_NotGenerateLoot,            //2^31 = 2147483648
	PlayerFlag_CanTalkRedChannelAnonymous, //2^32 = 4294967296
	PlayerFlag_IgnoreProtectionZone,       //2^33 = 8589934592
	PlayerFlag_IgnoreSpellCheck,           //2^34 = 17179869184
	PlayerFlag_IgnoreWeaponCheck,          //2^35 = 34359738368
	PlayerFlag_CannotBeMuted,              //2^36 = 68719476736
	PlayerFlag_IsAlwaysPremium,            //2^37 = 137438953472
	PlayerFlag_CanMoveFromDistance,		   //2^38 = 274877906944
	PlayerFlag_CanCtrlWalk,                //2^39 = 549755813888
        PlayerFlag_CannotMoveCreatures,        //2^40 = 1099511627776
        PlayerFlag_CannotMoveItems,            //2^41 = 2199023255552
    
	//add new flags here
	PlayerFlag_LastFlag

thats source, so if someone can calculate the ones i want and tell me i would love to know how.
i want these
Code:
        PlayerFlag_CannotAttackPlayer//2^1 = 2
        PlayerFlag_CanConvinceAll,             //2^4 = 16
	PlayerFlag_CanSummonAll,               //2^5 = 32
	PlayerFlag_CanIllusionAll,             //2^6 = 64
	PlayerFlag_CanSenseInvisibility,       //2^7 = 128
	PlayerFlag_IgnoredByMonsters,          //2^8 = 256
	PlayerFlag_NotGainInFight,             //2^9 = 512
	PlayerFlag_HasInfiniteMana,            //2^10 = 1024
	PlayerFlag_HasInfiniteSoul,            //2^11 = 2048
	PlayerFlag_HasNoExhaustion,        //2^12 = 4096
        PlayerFlag_CanAlwaysLogin,             //2^15 = 32768
	PlayerFlag_CanBroadcast,               //2^16 = 65536
	PlayerFlag_CanEditHouses,              //2^17 = 131072
	PlayerFlag_CannotBeBanned,             //2^18 = 262144
	PlayerFlag_CannotBePushed,             //2^19 = 524288
	PlayerFlag_HasInfiniteCapacity,        //2^20 = 1048576
	PlayerFlag_CanPushAllCreatures,        //2^21 = 2097152
	PlayerFlag_CanTalkRedPrivate,          //2^22 = 4194304
	PlayerFlag_CanTalkRedChannel,          //2^23 = 8388608
	PlayerFlag_TalkOrangeHelpChannel,      //2^24 = 16777216
	PlayerFlag_NotGainExperience,          //2^25 = 33554432
	PlayerFlag_NotGainMana,                //2^26 = 67108864
	PlayerFlag_NotGainHealth,              //2^27 = 134217728
	PlayerFlag_NotGainSkill,               //2^28 = 268435456
	PlayerFlag_SetMaxSpeed,                //2^29 = 536870912
	PlayerFlag_SpecialVIP,                 //2^30 = 1073741824
	PlayerFlag_CanTalkRedChannelAnonymous, //2^32 = 4294967296
	PlayerFlag_IgnoreProtectionZone,       //2^33 = 8589934592
	PlayerFlag_IgnoreSpellCheck,           //2^34 = 17179869184
	PlayerFlag_IgnoreWeaponCheck,          //2^35 = 34359738368
	PlayerFlag_CannotBeMuted,              //2^36 = 68719476736
	PlayerFlag_IsAlwaysPremium,            //2^37 = 137438953472
	PlayerFlag_CanMoveFromDistance,		   //2^38 = 274877906944
	PlayerFlag_CanCtrlWalk,                //2^39 = 549755813888

thx
 
you dont need to calculate anything...
the internal function hasFlag() will check if you have or not the specified flag
what distro are you using?
 
I'm using the forgotten server 2.9 mystic spirit.
how do i enable all the ones i want then? i need the value to paste in group id for god.
You know the number you need to enable flags. i hope you know what i mean.
 
Back
Top