• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Change Gender Item

Ahead

New Member
Joined
Dec 27, 2013
Messages
165
Reaction score
2
Everything i've seen in this forum are things refered to Shadowcores gender change so i haven't found a script like "Addon Doll" but into Gender way.

Do you know any?

Thank you.
 
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
    if getPlayerSex(cid, 0) then
        doPlayerSetSex(cid, 1)
        doRemoveItem(item.uid, 1)
    elseif getPlayerSex(cid, 1) then
        doPlayerSetSex(cid, 0)
        doRemoveItem(item.uid, 1)
    end
    return true
end

Might work :)
 
@Himii
Please try to use more metatables instead :/

Here is something fast i made:
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
    local player = Player(cid)
    player:setSex(player:getSex() == PLAYERSEX_FEMALE and PLAYERSEX_MALE or PLAYERSEX_FEMALE)
    player:getPosition():sendMagicEffect(CONST_ME_HOLYAREA)
    player:sendTextMessage(MESSAGE_INFO_DESCR, "You have changed your gender.")
    Item(item.uid):remove(1)
    return true
end
 
I cannot test it right now because i have several problems with ot item editor, so when i try it i will post as soon as possible if it worked.

Thanks you two.
 
Back
Top