• 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!

Solved Problem with teleport (rebirth teleport)

Thorn

Spriting since 2013
Joined
Sep 24, 2012
Messages
2,203
Solutions
1
Reaction score
923
Location
Chile
ghobsLlyp.png

Hello, well now i'm back to work with my server, and i encounter many bugs, wich one is this. First, i have a system of rebirths in my server, and i have teleports requiring 1 rebirth, 5 rebirth, 10 rebirth etc
but when you don't have a rebirth, it should say something like sorry, you cant pass, you need X rebirth
that works when the player actually has rebirths, but when it doesn't, this is what happens
basDque4k.png

10vN23sZS.png
TEvWQrrq.png

that means i'm sorry, you need to have prestige 10 to enter


plz someone help me :c
 
Code:
local teleportpos = {x=1049, y=895, z=7} --The position where player will be teleported
function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
    if getPlayerStorageValue(cid, 85987) >= 1 then --dont forget to edite to your rebirth storage
        doTeleportThing(cid, teleportpos, true)
    else
        doTeleportThing(cid, fromPosition, false)
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Lo siento, tienes que tener prestige 1 para entrar.')
        return true
    end
end

this is the script of the teleport that require 1 rebirth, all the other are the same
 
Here have my old server rebirth / level tiles it will give you an example and better ideas :)
Just a rebirth tile

Your would replace GetPlayerPrestige(cid) to this getPlayerStorageValue(cid, 85987)


Code:
function onStepIn(cid, item, position, fromPosition)
if getPlayerPrestige(cid) < 10 then
doTeleportThing(cid, fromPosition, FALSE)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "This is a 10th Prestige area you may not enter.")
end
return true
end
Level tile and if rebirth 1 then you ignore level and pass right threw it.
Code:
function onStepIn(cid, item, position, fromPosition)
if getPlayerPrestige(cid) >= 1 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Your prestige you can pass!")
elseif getPlayerLevel(cid) < 50 then
doTeleportThing(cid, fromPosition, FALSE)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You may not hunt here yet. Level: " .. getPlayerLevel(cid) .. "/50")
end
return true
end
 
Here have my old server rebirth / level tiles it will give you an example and better ideas :)
Just a rebirth tile
Code:
function onStepIn(cid, item, position, fromPosition)
if getPlayerPrestige(cid) < 10 then
doTeleportThing(cid, fromPosition, FALSE)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "This is a 10th Prestige area you may not enter.")
end
return true
end
Level tile and if rebirth 1 then you ignore level and pass right threw it.
Code:
function onStepIn(cid, item, position, fromPosition)
if getPlayerPrestige(cid) >= 1 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Your prestige you can pass!")
elseif getPlayerLevel(cid) < 50 then
doTeleportThing(cid, fromPosition, FALSE)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You may not hunt here yet. Level: " .. getPlayerLevel(cid) .. "/50")
end
return true
end
oh man, i would preffer to have mine working, is too messy for me change everything to yours, thanks anyway =))
 
try this ?
Edited it.
Code:
local teleportpos = {x = 1049, y = 895, z = 7} --The position where player will be teleported--

function onStepIn(cid, item, position, fromPosition)
    if getPlayerStorageValue(cid, 85987) >= 1 then --Storage id for rebirth's--
        doTeleportThing(cid, teleportpos, true)
    else
        doTeleportThing(cid, fromPosition, false)
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Lo siento, tienes que tener prestige 1 para entrar.')
    end
    return true
end
 
try this ?
Edited it.
Code:
local teleportpos = {x = 1049, y = 895, z = 7} --The position where player will be teleported--

function onStepIn(cid, item, position, fromPosition)
    if getPlayerStorageValue(cid, 85987) >= 1 then --Storage id for rebirth's--
        doTeleportThing(cid, teleportpos, true)
    else
        doTeleportThing(cid, fromPosition, false)
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Lo siento, tienes que tener prestige 1 para entrar.')
    end
    return true
end
HtrWhGRs4.png


:/ didn't work
 
The script didn't seem to be problem... Did you check your storage in the database?

Pd: I died on the cycplops the other day in your server and got mad.
 
The script didn't seem to be problem... Did you check your storage in the database?

Pd: I died on the cycplops the other day in your server and got mad.
mmm weird, is only happening to this character, and i don't have my server up :/
 
As colors said above Did you check if rebirths are actualy being added to the player and with the storage id of 85987 and make sure you do have storage 85987:10.
The script didn't seem to be problem... Did you check your storage in the database?

Pd: I died on the cycplops the other day in your server and got mad.
 
As colors said above Did you check if rebirths are actualy being added to the player and with the storage id of 85987 and make sure you do have storage 85987:10.
i have no idea how to check that sorry, but aparently the char is buged, made a new char and it works fine, thanks to you all! :D
plz tag this thread as solved =)
 
Back
Top