Exiled Pain
Fervid Learner
- Joined
- Jan 8, 2008
- Messages
- 552
- Reaction score
- 4
Sup, I'm using this to change characters sex with an item, It works fine to jump to the next sex section, but It won't go back to the original sex...
Females standard sex is = 0 and secundary is = 2
Males standard sex is = 1 and secundary is = 3
So it works, but when I try to go back from 2 -> 0 or from 3->1 it won't change. Please help.
Females standard sex is = 0 and secundary is = 2
Males standard sex is = 1 and secundary is = 3
So it works, but when I try to go back from 2 -> 0 or from 3->1 it won't change. Please help.
Code:
function onUse(cid, item, frompos, item2, topos)
local playerPos = getCreaturePosition(cid)
local playerSex = getPlayerSex(cid)
if playerSex == 0 then --female 1
doPlayerSetSex(cid, 2)
doRemoveCreature(cid,true)
elseif playerSex == 2 then --female 2
doPlayerSetSex(cid, 0)
doRemoveCreature(cid,true)
elseif playerSex == 1 then --male 1
doPlayerSetSex(cid, 3)
doRemoveCreature(cid,true)
elseif playerSex == 3 then --male 2
doPlayerSetSex(cid, 1)
else --other sex
doSendAnimatedText(playerPos, 'Cant change', TEXTCOLOR_GOLD)
end
return TRUE
end