Item dzia?a dobrze, znika gdy mamy go w bp, gdy polozymy go nie ziemi i zacznimy zmieniac to nie znika w ogole...
[LUA]function onUse(cid, item, fromPosition, itemEx, toPosition)
if(getPlayerSex(cid) >= 2) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You cannot change your gender.")
return TRUE
end
if(getPlayerSex(cid) == PLAYERSEX_FEMALE) then
doPlayerSetSex(cid, PLAYERSEX_MALE)
else
doPlayerSetSex(cid, PLAYERSEX_FEMALE)
end
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have changed your gender.")
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_RED)
doPlayerRemoveItem(cid,9955,1)
return TRUE
end[/LUA]
[LUA]function onUse(cid, item, fromPosition, itemEx, toPosition)
if(getPlayerSex(cid) >= 2) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You cannot change your gender.")
return TRUE
end
if(getPlayerSex(cid) == PLAYERSEX_FEMALE) then
doPlayerSetSex(cid, PLAYERSEX_MALE)
else
doPlayerSetSex(cid, PLAYERSEX_FEMALE)
end
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have changed your gender.")
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_RED)
doPlayerRemoveItem(cid,9955,1)
return TRUE
end[/LUA]