• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Premium to Free

brunotuegostoso

New Member
Joined
Sep 27, 2019
Messages
14
Reaction score
1
Hello people from the forum, I have another question, how can I do for a player when premium time, when it is over, he is teleported to free area with free outfit?
tfs 0.4...
 
Solution
Try this one
LUA:
function onLogin(cid)

registerCreatureEvent(cid,"FimPremium")

local pos = {x = 32369, y = 32241, z = 7}

if isPremium(cid) then

setPlayerStorageValue(cid, 59898989, 1)

elseif getPlayerStorageValue(cid, 59898989) == 1 and not isPremium(cid) and getPlayerSex(cid) == 0 then

doCreatureChangeOutfit(cid, {lookType = 136})

doTeleportThing(cid, pos)

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "You premium is Over!")

setPlayerStorageValue(cid, 59898989, -1)

elseif getPlayerStorageValue(cid, 59898989) == 1 and not isPremium(cid) and getPlayerSex(cid) == 1 then
doCreatureChangeOutfit(cid, {lookType = 128})

doTeleportThing(cid, pos)

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "You premium is...
For outfit you can edit your Premium/Free outfits through data\XML\outfits and add
premium="yes"
and about the teleport to free area
 
this works but I can not make the female with female clothes, he is just male, male citzen.

<outfit id="1">
<list gender="1" lookType="128" name="Citizen"/>
<list gender="0" lookType="136" name="Citizen"/>
</outfit>


LUA:
function onLogin(cid)

registerCreatureEvent(cid,"FimPremium")

local pos = {x = 32369, y = 32241, z = 7}

if isPremium(cid) then

setPlayerStorageValue(cid, 59898989, 1)

elseif getPlayerStorageValue(cid, 59898989) == 1 and not isPremium(cid) then

doCreatureChangeOutfit(cid, {lookType = 128})

doTeleportThing(cid, pos)

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "You premium is Over!")

setPlayerStorageValue(cid, 59898989, -1)

end

return TRUE

end
 
Try this one
LUA:
function onLogin(cid)

registerCreatureEvent(cid,"FimPremium")

local pos = {x = 32369, y = 32241, z = 7}

if isPremium(cid) then

setPlayerStorageValue(cid, 59898989, 1)

elseif getPlayerStorageValue(cid, 59898989) == 1 and not isPremium(cid) and getPlayerSex(cid) == 0 then

doCreatureChangeOutfit(cid, {lookType = 136})

doTeleportThing(cid, pos)

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "You premium is Over!")

setPlayerStorageValue(cid, 59898989, -1)

elseif getPlayerStorageValue(cid, 59898989) == 1 and not isPremium(cid) and getPlayerSex(cid) == 1 then
doCreatureChangeOutfit(cid, {lookType = 128})

doTeleportThing(cid, pos)

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "You premium is Over!")

setPlayerStorageValue(cid, 59898989, -1)
end

return TRUE

end
 
Solution
Back
Top