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

rep + | tfs 0.4 Reward problem ! FAST !

djmax1

Dashim
Joined
Jul 21, 2010
Messages
273
Reaction score
27
Hello, I need help. I got problem with reward script on TFS...
I need to make script what's adds money like "player level * 100gp"
ex. 8 lvl * 100gp = 800 gp. etc. etc.

I need answer really fast. Thanks
rep + for help :))
 
you can do something like this:


function onUse(cid, item, frompos, item2, topos)
local STORAGE = 63000
if (getPlayerStorageValue(cid, STORAGE)) == -1 then
local money = getPlayerLevel(cid) * 100 -- This will add 100 golds per each level
local Reward = doPlayerAddMoney(cid, money)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have received a total of " .. money .. " gold pieces.")
setPlayerStorageValue(cid, STORAGE, 1)
end
return true
end
 
Back
Top