mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-06-09 05:54:50 +02:00
Updated Commands.
This commit is contained in:
parent
0c435d91c9
commit
09705bec4e
15 changed files with 302 additions and 59 deletions
|
@ -2,11 +2,16 @@ require("global");
|
|||
|
||||
properties = {
|
||||
permissions = 0,
|
||||
parameters = "sss",
|
||||
description = "adds <currency> to self or <target>.",
|
||||
parameters = "ssss",
|
||||
description =
|
||||
[[
|
||||
Adds currency <qty> to player or <targetname>
|
||||
!addcurrency <item> <qty> |
|
||||
!addcurrency <item> <qty> <targetname> |
|
||||
]],
|
||||
}
|
||||
|
||||
function onTrigger(player, argc, currency, name, lastName)
|
||||
function onTrigger(player, argc, currency, qty, name, lastName)
|
||||
local sender = "[givecurrency] ";
|
||||
|
||||
if name then
|
||||
|
@ -19,10 +24,10 @@ function onTrigger(player, argc, currency, name, lastName)
|
|||
|
||||
if player then
|
||||
currency = tonumber(currency) or nil;
|
||||
qty = 1;
|
||||
qty = tonumber(qty) or 1;
|
||||
location = INVENTORY_CURRENCY;
|
||||
|
||||
local added = player:GetInventory(location):AddItem(currency, qty);
|
||||
local added = player:GetInventory(location):AddItem(currency, qty, 1);
|
||||
local messageID = MESSAGE_TYPE_SYSTEM_ERROR;
|
||||
local message = "unable to add currency";
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue