Page 1 of 1

[RESOLVED] Need help? How to close a briefcase!

Posted: Tue Mar 12, 2024 7:39 pm
by STAR_Founder
hi guys! trying to make a lil thing to spawn in a case of 50k!
mountin' the cash into the case only works if its open, so i thought i'd just spawn it open, mount the cash, and close it later. but i can't figure out how!!! :oops:

code below is what im trying. please help!

Code: Select all

plugin.commands["/grill2"] = {
    info = "Spawn 50k Briefcase",
    canCall = function(ply) return ply.isAdmin end,
    call = function(ply, man, args)
        assert(man, "Not spawned in.")
        local case = items.create(itemTypes[16], man.pos, orientations.n) -- Make Briefcase
        for i = 0, 4 do
            local cash = items.create(itemTypes[18], man.pos, orientations.n)
            --cash.cashSpread = 5 -- Visual count in stack
            cash.cashAmount = -1	-- Number of bills in stack, starting at zero.
            cash:cashRemoveBill(0)
            for i = 0, 9 do
                cash:cashAddBill(1, 6)
            end
            case:mountItem(cash, 0)
        end
        case.itemType = 15
        case:update()
    end
}

Re: Need help? How to close a briefcase!

Posted: Wed Mar 13, 2024 10:10 am
by STAR_Founder
jacob helped me with this one! its case.type not case.itemType :lol: