Jump to content

Inventory Check

Closed 1.3.4

Somescrub
Somescrub

Posted

So I have an NPC in place that will sell items in exchange for Economics cash. I am doing this through server commands in the conversation file. Pretty simple setup - but with one problem. Anytime a player's inventory is full, it will produce a console error:

Couldn't give item (inventory full?)

It won't give the items (won't even dump them on the ground), but then proceeds to execute the $ withdraw anyways from the player's balance.

 

Just wondering if it is possible to add an inventory check of some sort, or force it to be ejected to the ground if full - before it executes any kind of command. Or, if you know of a better way to do this I am all ears...

Razor

Posted

try command GiveItem <itemID> <amount> 

Somescrub

Posted

Did not work - still deducts from the balance and does not give the item when the inventory is full

Razor

Posted (edited)

should drop the item on the ground post your conversation file or dm it to me. did you try the edit with non full inventory to see if it was working

What item are you tying to give 

 

Edited by Razor
Razor

Posted

Try Giveitem <item id> <amount> <skinID>   skinID will be 0 if no skin

Somescrub

Posted

That last one worked perfect - and put a message in chat as well that it was dropped on the ground. Thank you very much for the quick responses!

 

Razor

Posted

Changed Status from Pending to Closed

1.4m

Downloads

Total number of downloads.

6.9k

Customers

Total customers served.

102.3k

Files Sold

Total number of files sold.

2m

Payments Processed

Total payments processed.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.