1. Check out the Store if you're looking to Buy HL2RP or other schemas for your server. You can click Buy Schemas on the very top navigation bar to visit the store.
  2. Use the Plugin Center to easily subscribe to and auto-install Clockwork plugins to your server, or submit and share plugins you have developed.
  3. Having trouble setting up or developing with Clockwork? Check out the Wiki or post in the Support Forum for advice from fellow users.
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 Active Member

    This is actually not work, any idea?
    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.");
  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

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

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

    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 Active Member

    Work, ty.
    • Informative Informative x 1

Previous Readers (Total: 0)