noooooooooooooooo changenderYou mean changegender ?
Else I'd have no clue what you meant..
function onSay(cid, words, param)
if(getPlayerSex(cid) == 2) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You cannot change your gender.")
return TRUE
end
if(getPlayerPremiumDays(cid) > 2) then
if(getPlayerPremiumDays(cid) < 65535) then
doPlayerAddPremiumDays(cid, -3)
end
if(getPlayerSex(cid) == 0) then
doPlayerSetSex(cid, 1)
else
doPlayerSetSex(cid, 0)
end
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have changed your gender and lost three days of premium time.")
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_RED)
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Sorry, not enough premium time- changing gender costs three days.")
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
end
return TRUE
end
Code:function onSay(cid, words, param) if(getPlayerSex(cid) == 2) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You cannot change your gender.") return TRUE end if(getPlayerPremiumDays(cid) > 2) then if(getPlayerPremiumDays(cid) < 65535) then doPlayerAddPremiumDays(cid, -3) end if(getPlayerSex(cid) == 0) then doPlayerSetSex(cid, 1) else doPlayerSetSex(cid, 0) end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have changed your gender and lost three days of premium time.") doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_RED) else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Sorry, not enough premium time- changing gender costs three days.") doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF) end return TRUE end
and it's already in TFSb3
Code:function onSay(cid, words, param) if(getPlayerSex(cid) == 2) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You cannot change your gender.") return TRUE end if(getPlayerPremiumDays(cid) > 2) then if(getPlayerPremiumDays(cid) < 65535) then doPlayerAddPremiumDays(cid, -3) end if(getPlayerSex(cid) == 0) then doPlayerSetSex(cid, 1) else doPlayerSetSex(cid, 0) end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have changed your gender and lost three days of premium time.") doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_RED) else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Sorry, not enough premium time- changing gender costs three days.") doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF) end return TRUE end
and it's already in TFSb3
function onSay(cid, words, param)
local costmoney = 10000
if(getPlayerSex(cid) == 2) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You cannot change your gender.")
return TRUE
end
if doPlayerRemoveMoney(cid, costmoney) == true then
if(getPlayerSex(cid) == 0) then
doPlayerSetSex(cid, 1)
else
doPlayerSetSex(cid, 0)
end
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have changed your gender for "..costmoney.."gp.")
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_RED)
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Sorry, not enough money for changing your gender, this costs "..costmoney.."gp.")
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
end
return TRUE
end
ah thx i will try that ) damn thx for fast replyThanks, but he wanted to remove money.
I used that script to edit it for him
Code:function onSay(cid, words, param) local costmoney = 10000 if(getPlayerSex(cid) == 2) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You cannot change your gender.") return TRUE end if doPlayerRemoveMoney(cid, costmoney) == true then if(getPlayerSex(cid) == 0) then doPlayerSetSex(cid, 1) else doPlayerSetSex(cid, 0) end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have changed your gender for "..costmoney.."gp.") doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_RED) else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Sorry, not enough money for changing your gender, this costs "..costmoney.."gp.") doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF) end return TRUE end
function onSay(cid, words, param)
local costmoney = 10000
if(getPlayerSex(cid) == 2) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You cannot change your gender.")
return TRUE
end
if(getPlayerMoney(cid) >= costmoney) and (getPlayerSex(cid) == 0) then
doPlayerRemoveMoney(cid, costmoney)
doPlayerSetSex(cid, 1)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have changed your gender to male for "..costmoney.." gold.")
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_RED)
elseif(getPlayerMoney(cid) >= costmoney) and (getPlayerSex(cid) == 1) then
doPlayerRemoveMoney(cid, costmoney)
doPlayerSetSex(cid, 0)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have changed your gender to female for "..costmoney.." gold.")
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_RED)
else
doPlayerSendCancel(cid, "Sorry, you only have "..getPlayerMoney(cid).." gold, it costs "..costmoney.." gold to change."))
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
return TRUE
end
Code:function onSay(cid, words, param) local costmoney = 10000 if(getPlayerSex(cid) == 2) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You cannot change your gender.") return TRUE end if(getPlayerMoney(cid) >= costmoney) and (getPlayerSex(cid) == 0) then doPlayerRemoveMoney(cid, costmoney) doPlayerSetSex(cid, 1) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have changed your gender to male for "..costmoney.." gold.") doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_RED) elseif(getPlayerMoney(cid) >= costmoney) and (getPlayerSex(cid) == 1) then doPlayerRemoveMoney(cid, costmoney) doPlayerSetSex(cid, 0) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have changed your gender to female for "..costmoney.." gold.") doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_RED) else doPlayerSendCancel(cid, "Sorry, you only have "..getPlayerMoney(cid).." gold, it costs "..costmoney.." gold to change.")) doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF) return TRUE end
Didn't test or look for errors but should work. Reply if it works, or reply with errors from console.
[PHP]function onSay(cid, words, param)
local costmoney = 10000
if(getPlayerSex(cid) == 2) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You cannot change your gender.")
return TRUE
end
if(getPlayerMoney(cid) >= costmoney) and (getPlayerSex(cid) == 0) then
doPlayerRemoveMoney(cid, costmoney)
doPlayerSetSex(cid, 1)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have changed your gender to male for "..costmoney.." gold.")
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_RED)
elseif(getPlayerMoney(cid) >= costmoney) and (getPlayerSex(cid) == 1) then
doPlayerRemoveMoney(cid, costmoney)
doPlayerSetSex(cid, 0)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have changed your gender to female for "..costmoney.." gold.")
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_RED)
else
doPlayerSendCancel(cid, "Sorry, you only have "..getPlayerMoney(cid).." gold, it costs "..costmoney.." gold to change.")
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
return TRUE
end
function onSay(cid, words, param)
local cost = 10000
if doPlayerRemoveMoney(cid, cost) == TRUE then
if getPlayerSex(cid) == 1 then
doPlayerSetSex(cid, 0)
else
doPlayerSetSex(cid, 1)
end
dosendMagicEffect(getCreaturePosition(cid), 13)
doPlayerSendTextMessage(cid, 24, "You have changed your sex for the amount of " .. cost .. " gps.")
else
doSendMagicEffect(getCreaturePosition(cid), 2)
doPlayerSendCancel(cid, "You do not have enough money.")
end
return TRUE
end