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

[7.6] Przerobienie kodu.

Dawcio92

New Member
Joined
Sep 9, 2019
Messages
31
Reaction score
0
Witam,
posiadam kod dla YurOTS 0.94f na blokadę zakładania dwóch broni naraz. Ale żeby założyć broń jednoręczną, muszę najpierw ściągnąć tarczę. Jak się pozbyć tego problemu?

C++:
Item* prawa = player->items[SLOT_RIGHT];
    Item* lewa = player->items[SLOT_LEFT];

    if(toSlot == SLOT_RIGHT || toSlot == SLOT_LEFT){
      if(((item->isWeapon() || item->isWand()) && item->getWeaponType() != SHIELD) && (lewa && (lewa->isWeapon() || lewa->isWand()) || prawa && (prawa->isWeapon() || prawa->isWand()))){
        if(lewa && lewa->getSlotPosition() & SLOTP_TWO_HAND || prawa && prawa->getSlotPosition() & SLOTP_TWO_HAND){
        } else{
          player->sendTextMessage(MSG_BLUE_TEXT,"You can not use two weapons at once. Weapon first, then put your shield. ");
          return false;
        }
      }
    }
 
Back
Top