Jump to content

Command not working

Work in Progress 1.1.81

Rome74
Rome74

Posted (edited)

I have the Shop integrated into the Welcome Panel.  Items and commands are showing up in the panel just fine.  When I buy an item it is delivered, but when I buy a command it does not execute the command.  I have executed the command via the F1 console and via an external RCON client and both work as expected.  The message is sent to chat but the item the command creates is not delivered.

I also removed the integration with the Welcome Panel and used the Shop as a standalone and the same result.  Items are delivered, commands are not.  I also am not able to use {playername} in a from the Shop (integrated or not). It just dumps {playername} into chat and doesn't replace with the players name.  I suspect this may be the cause of the command failing to deliver.

Edited by Rome74
Add more information
David

Posted

Please show me how did you setup that command in Shop data files.

Rome74

Posted

In the Categories.json I added "command/slotmachine", to the list of items.

Here is the Commands.json 
{
  "slotmachine": {
    "DisplayName": "Personal Slot Machine",
    "Image": "https://www.dropbox.com/s/f80amu81z8uy3te/slotmachineiconsmall.png?dl=1",
    "Message": "You may now gamble in the comfort of your own base! Good Luck, {playername}!",
    "Command": "slotmachine.give {playername}",
    "BuyPrice": 10,
    "Currency": "rp",
    "ShowDisplayName": true
  }
}

The Message is sent and shows, but does not replace the placeholder with player's name.  Using that command via external RCON or F1 console does work, replacing {playername} with name. On a side note, I do use the {playername} tag on the main page of the Welcome Panel and it does work nicely.

Thanks for the help.

David

Posted

{playername} is not valid tag in Shop plugin, thats something I would have to add.

David

Posted

Changed Status from Pending to Work in Progress

1.4m

Downloads

Total number of downloads.

6.9k

Customers

Total customers served.

102.4k

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.