Hello,
My sex change script only works one way. When changing from boy to girl everything is ok - sex of the revenge, the doll disappears. However, when trying to change from girl to boy nothing happens - sex does not change, the doll does not disappear.
Can anyone help?
Haskys
My sex change script only works one way. When changing from boy to girl everything is ok - sex of the revenge, the doll disappears. However, when trying to change from girl to boy nothing happens - sex does not change, the doll does not disappear.
Can anyone help?
Lua:
function onUse(cid, item, fromPosition, item2, toPosition)
local sexs = {
[1] = {s=1},
[1] = {s=0}
}
local sex = sexs[getPlayerSex(cid)]
if sex then
doPlayerSetSex(cid,sex.s)
doRemoveItem(item.uid,1)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"Your sex has been changed")
end
return true
end
Haskys