- Dołączył
- Luty 12, 2012
- Posty
- 337
- Liczba reakcji
- 11
Witam, mam taki skrypt na zamiane cc w gn i odwrotnie
Tutaj aktualnie zamienia cc w gn ale nie zamienia? gn w cc wi?c doda?em kolejne linijki i mam problem, ?e teraz zamieni 1gn w 100cc ale ju? 100cc w 1gn nie chce ;/ Do tego gdy mamy np. 100gn nie zamieni je w cc trzeba rozdzieli? pierw na 1gn i dopiero.
---------- Tre?? dodana o 11:13 ----------
ref
---------- Tre?? dodana o 13:30 ----------
ref
Kod:
function onUse(cid, item, frompos, item2, topos)
if item.itemid == 2160 and item.type == 100 then
doRemoveItem(item.uid,item.type)
doPlayerAddItem(cid,2157,1)
doPlayerSendTextMessage(cid,22,"$$$")
elseif item.itemid == 2160 and item.type < 100 then
doRemoveItem(item.uid,1)
doPlayerAddItem(cid,2152,100)
doPlayerSendTextMessage(cid,22,"$$$")
end
end
Tutaj aktualnie zamienia cc w gn ale nie zamienia? gn w cc wi?c doda?em kolejne linijki i mam problem, ?e teraz zamieni 1gn w 100cc ale ju? 100cc w 1gn nie chce ;/ Do tego gdy mamy np. 100gn nie zamieni je w cc trzeba rozdzieli? pierw na 1gn i dopiero.
Kod:
function onUse(cid, item, frompos, item2, topos)
if item.itemid == 2157 and item.type == 1 then
doRemoveItem(item.uid,item.type)
doPlayerAddItem(cid,2160,100)
doPlayerSendTextMessage(cid,22,"$$$")
if item.itemid == 2160 and item.type == 100 then
doRemoveItem(item.uid,item.type)
doPlayerAddItem(cid,2157,1)
doPlayerSendTextMessage(cid,22,"$$$")
elseif item.itemid == 2160 and item.type < 100 then
doRemoveItem(item.uid,1)
doPlayerAddItem(cid,2152,100)
doPlayerSendTextMessage(cid,22,"$$$")
end
end
end
---------- Tre?? dodana o 11:13 ----------
ref
---------- Tre?? dodana o 13:30 ----------
ref