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

Lua HELP TFS 1.4 LEVER SHOP

VagosClubTM

Active Member
Joined
Aug 16, 2019
Messages
219
Reaction score
32
Location
Chile
hello friends, I hope you are well, I am looking for this script instead of charging in crystal coins, it charges you in smalldiamond (2145), to make it a vip store

Lua:
local c = {
    ['item'] = 2565,
    ['cost'] = 200 * 10000,
    [1945] = 1946, -- lever
    [1946] = 1945 -- lever
}

function onUse(player, item, fromPosition, itemEx, toPosition)
  local cid = player:getId()
    if doPlayerRemoveMoney(cid, c.cost) then
            doPlayerAddItem(cid, c.item, 1)
            doPlayerSendTextMessage(cid, 25,"You bought an item for ".. c.cost .." gold")
    else
            doPlayerSendCancel(cid, "You do not have enough money!")
    end
  item:transform(c[item.itemid])
    return true
end

thanks to those who take the time thanks
 
Solution
Dude.. literally you need to learn how to do this yourself at this point.
It's like 1 small function change.

There no point in writing 30+ support threads, if you aren't willing to learn anything.
Lua:
if player:getItemCount(diamondId) >= c.cost then
Dude.. literally you need to learn how to do this yourself at this point.
It's like 1 small function change.

There no point in writing 30+ support threads, if you aren't willing to learn anything.
Lua:
if player:getItemCount(diamondId) >= c.cost then
 
Solution
Dude.. literally you need to learn how to do this yourself at this point.
It's like 1 small function change.

There no point in writing 30+ support threads, if you aren't willing to learn anything.
Lua:
if player:getItemCount(diamondId) >= c.cost then
Thanks bro, I don't do it just for myself, but also so that it remains as a help for users like me who don't know much. Greetings and thanks for the help.
 
hello bro sorry for the inconvenience is it possible to make the lever sell you addons?

in items should I put addons? as it is 772 it does not have addons only the unique skin
 
Lua:
if player:getItemCount(diamondId) >= c.cost then
    if not player:hasOutfit(lookType, addon) then
        player:addOutfitAddon(lookType, addon) -- note that this would give them the outfit, if they don't own it already
    else
        print("already has this addon")
    end
end
 
Back
Top