Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
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!
function onUse(cid,item,fromPosition,itemEx,toPosition)
local storage = 4040
getPlayerLevel(cid) > 8 then
doPlayerAddLevel(cid, 1, false)
doPlayerSendTextMessage(cid,21,"Gained 1 Levels!")
end
return true
end
function onUse(cid,item,fromPosition,itemEx,toPosition)
local storage = 4040
if getPlayerLevel(cid) > 8 then
doPlayerAddLevel(cid, 1, false)
doPlayerSendTextMessage(cid,21,"Gained 1 Levels!")
end
return true
end
Also you defined storage, but didnt add storage check.
Code:
if getPlayerStorage(storage) ~= 1 then
doPlayerAddStorage(storage, 1)
else
doPlayerSendTextMessage(cid, 21, "Sorry not possible")
end
It's just example use your tfs functions and that's all.
Using a couple assumptions based on the request, I assume this is what you want to happen.
Click Once.
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerLevel(cid) < 8 then
local amount = 8 - getPlayerLevel(cid)
for i = 1, amount do
doPlayerAddLevel(cid, 1, true)
end
doPlayerSendTextMessage(cid, 21, "You have advanced to level " .. getPlayerLevel(cid) .. "!")
end
return true
end
Click Multiple Times.
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerLevel(cid) < 8 then
doPlayerAddLevel(cid, 1, true)
doPlayerSendTextMessage(cid, 21, "You have advanced to level " .. getPlayerLevel(cid) .. "!")
end
return true
end