lordmarian
Advanced User
- Joined
- May 26, 2009
- Messages
- 366
- Reaction score
- 19
Witam mam problem po uzyciu transformacji wylogowaniu i zalogowaniu si? sie r??ne rzeczy jestem "magicefectem", zmienia mi sie outfit nie wiem czemu tak sie dzi?je.
Oto kawa?ek skryptu z function.lua
Gdy usun? t? cz??? to po zalogowaniu mam wyglad taki jaki mialem ostatni i nie ma ?adnych b??d?w. Jedynie czego potrzebuje to ?eby t? cze?? zamieni? na skrpyt kt?ry bd ustawial mi po zalogowaniu looktype jaki sobie wybiore dla danej voc.
Oto kawa?ek skryptu z function.lua
PHP:
TransformSys.loadOutfit = function (cid)
local outfit = {lookAddons = 0, lookType = 0, lookHead = 0, lookTypeEx = 0, lookLegs = 0, lookBody = 0, lookFeet = 0}
outfit.lookType = getPlayerStorageValue(cid, Transform_config.storageSaveOutfit + 1) -- I know its ugly but really there is no other good way to load outfit xd
if(outfit.lookType == -1) then -- jesli gracz nie ma zapisanego outfitu
return Transform_config.defaultOutfit -- ustawia outfit na standardowy
end
outfit.lookTypeEx = getPlayerStorageValue(cid, Transform_config.storageSaveOutfit + 3)
outfit.lookHead = getPlayerStorageValue(cid, Transform_config.storageSaveOutfit + 2)
outfit.lookBody = getPlayerStorageValue(cid, Transform_config.storageSaveOutfit + 5)
outfit.lookLegs = getPlayerStorageValue(cid, Transform_config.storageSaveOutfit + 4)
outfit.lookFeet = getPlayerStorageValue(cid, Transform_config.storageSaveOutfit + 6)
outfit.lookAddons = getPlayerStorageValue(cid, Transform_config.storageSaveOutfit)
return outfit
end
Gdy usun? t? cz??? to po zalogowaniu mam wyglad taki jaki mialem ostatni i nie ma ?adnych b??d?w. Jedynie czego potrzebuje to ?eby t? cze?? zamieni? na skrpyt kt?ry bd ustawial mi po zalogowaniu looktype jaki sobie wybiore dla danej voc.
PHP:
outfit.lookTypeEx = getPlayerStorageValue(cid, Transform_config.storageSaveOutfit + 3)
outfit.lookHead = getPlayerStorageValue(cid, Transform_config.storageSaveOutfit + 2)
outfit.lookBody = getPlayerStorageValue(cid, Transform_config.storageSaveOutfit + 5)
outfit.lookLegs = getPlayerStorageValue(cid, Transform_config.storageSaveOutfit + 4)
outfit.lookFeet = getPlayerStorageValue(cid, Transform_config.storageSaveOutfit + 6)
outfit.lookAddons = getPlayerStorageValue(cid, Transform_config.storageSaveOutfit)