• 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!

[TFS 1.X] Disable mounts for "X" looktype/outfit

Athenuz

Owlz!
Joined
Oct 1, 2015
Messages
234
Reaction score
27
Location
México
Hello!

I need to disable the mounts for "X" outfits/looktypes

If the player is wearing/using "citizen outfit" he can't use/ride mounts.

Is that possible?

Thanks
 
For example,

Below this line:
Code:
const Outfit* playerOutfit = Outfits::getInstance()->getOutfitByLookType(getSex(), defaultOutfit.lookType);
if (!playerOutfit) {
    sendCancelMessage(RETURNVALUE_NOTPOSSIBLE);
    return false;
}

Add:
Code:
if ((playerOutfit->lookType == 128) || (playerOutfit->lookType == 136)) {
   sendCancelMessage(RETURNVALUE_NOTPOSSIBLE);
   return false;
}

Let me know if you get any compiling errors.
 
For example,

Below this line:
Code:
const Outfit* playerOutfit = Outfits::getInstance()->getOutfitByLookType(getSex(), defaultOutfit.lookType);
if (!playerOutfit) {
    sendCancelMessage(RETURNVALUE_NOTPOSSIBLE);
    return false;
}

Add:
Code:
if ((playerOutfit->lookType == 128) || (playerOutfit->lookType == 136)) {
   sendCancelMessage(RETURNVALUE_NOTPOSSIBLE);
   return false;
}

Let me know if you get any compiling errors.

Works perfect!!!

Thanks!
 
Sorry to relive old threads, but is it possible for this to become a LUA function for TFS 1.2. If so, some code would be appreciated!
 
Thank you! It's a start! Quick question, since the gamemaster outfit can't mount, that's in the source not lua correct (i'm 99.9% sure it's source just wanted to confirm)?
 
Back
Top