bool Player::changeOutfit(Outfit_t outfit, bool checkList)
{
int32_t team = getStorage(1234);
if (team == 1)
outfit.lookFeet = numerek kolorku butów pierwszego teamu;
else
outfit.lookFeet = numerek kolorku butów drugiego teamu;
uint32_t outfitId = Outfits::getInstance()->getOutfitId(outfit.lookType);
if(checkList && (!canWearOutfit(outfitId, outfit.lookAddons) || !requestedOutfit))
return false;
requestedOutfit = false;
if(outfitAttributes)
{
uint32_t oldId = Outfits::getInstance()->getOutfitId(defaultOutfit.lookType);
outfitAttributes = !Outfits::getInstance()->removeAttributes(getID(), oldId, sex);
}
defaultOutfit = outfit;
outfitAttributes = Outfits::getInstance()->addAttributes(getID(), outfitId, sex, defaultOutfit.lookAddons);
return true;
}
Code:bool Player::changeOutfit(Outfit_t outfit, bool checkList) { int32_t storage = getStorage(1234); if (team == 1) outfit.lookFeet = numerek kolorku butów pierwszego teamu; else outfit.lookFeet = numerek kolorku butów drugiego teamu; uint32_t outfitId = Outfits::getInstance()->getOutfitId(outfit.lookType); if(checkList && (!canWearOutfit(outfitId, outfit.lookAddons) || !requestedOutfit)) return false; requestedOutfit = false; if(outfitAttributes) { uint32_t oldId = Outfits::getInstance()->getOutfitId(defaultOutfit.lookType); outfitAttributes = !Outfits::getInstance()->removeAttributes(getID(), oldId, sex); } defaultOutfit = outfit; outfitAttributes = Outfits::getInstance()->addAttributes(getID(), outfitId, sex, defaultOutfit.lookAddons); return true; }
player.cpp![]()
int32_t team = getStorage(1234);
outfit.lookFeet = team;
Zaproponowałbym coś takiego, gdyż można stworzyć więcej niż 2 teamy ;]
Nie ma za co, polecamy sie na przyszlosc, pomozemy w miare mozliwosci.
Nie chce repka.
No niestety nie mogę dać :/ Ale i tak już masz dużo![]()
bool Player::changeOutfit(Outfit_t outfit, bool checkList)
{
[b]std::string zmienna;
this->getStorageValue(1234, &zmienna);
outfit.lookFeet = atoi(zmienna.c_str());[/b]
uint32_t outfitId = Outfits::getInstance()->getOutfitId(outfit.lookType);
if(checkList && (!canWearOutfit(outfitId, outfit.lookAddons) || !requestedOutfit))
return false;
requestedOutfit = false;
if(outfitAttributes)
{
uint32_t oldId = Outfits::getInstance()->getOutfitId(defaultOutfit.lookType);
outfitAttributes = !Outfits::getInstance()->removeAttributes(getID(), oldId, sex);
}
defaultOutfit = outfit;
outfitAttributes = Outfits::getInstance()->addAttributes(getID(), outfitId, sex, defaultOutfit.lookAddons);
return true;
}
@UP Nie zrozumiałem tego co napisałeś ;/