1. This forum is ARCHIVED! Visit the new Cloud Sixteen forums, codename Eden, at https://eden.cloudsixteen.com. These forums will remain archived for a few months before being closed down, so try to encourage plugin developers to begin moving their content across to the new forums.
Dismiss Notice
Hi Guest, you need a Steam account to register and post on these forums. Login with Steam at the top of the forums to get started!
Dismiss Notice
Hi Guest, do you want to buy HL2RP or another Clockwork schema? Visit the Cloud Sixteen Store to get started!

Other [SOLVED] Commands not working

Discussion in 'Development' started by Mixed, Dec 10, 2017.

  1. Mixed

    Mixed removed Clockwork Customer

    This is actually not work, any idea?
    Code:
    function COMMAND:OnRun(player, arguments)
        local spawntable = { Vector(-669.338135, -1344.985718, -79.968750) }
        local airdrop = Clockwork.item:CreateInstance("chest1");
    
        Clockwork.entity:CreateItem(nil, airdrop, entity:GetPos() + spawntable)
    
        Clockwork.player:NotifyAll("Airdrop appears on the map.");
    end;
    
     
  2. ZeMysticalTaco

    ZeMysticalTaco yo i'm a taco have some lunch Clockwork Customer

    Have you tried spawntable[1] instead of spawntable?

    Also why are you adding the position of your 'newly created entity' + a different vector?

    have you tried doing

    Code:
    local airdrop = Clockwork.item:FindByID("chest1")
    ?

    From the looks of the arguments of the CreateItem function, you could just enter:

    Code:
    Clockwork.entity:CreateItem(nil, "chest1", spawntable[1])
    It's been awhile since I've used CreateItem so either of those could be wrong.
     
    • Agree Agree x 1
  3. Mixed

    Mixed removed Clockwork Customer

    Code:
    spawntable[1]
    Work, ty.
     
    • Informative Informative x 1

Previous Readers (Total: 0)