Jump to content

add command to a button on panel

Closed 1.0.19

SocietyTime
SocietyTime

Posted

i would like to have the server execute a command and give a kit to a player if they click the button i have made

i see that there must be a way to do this but im having trouble with the syntax

ive tried secret give ({user} - user steamid) "Secret Kit" but this doesnt seem to work right. How would i set this up properly to give the player that clicks the button a specific kit?

(we use /secret instead of /kit)

Mevent

Posted

Hi! You need to use “%steamid%” instead of “{user}”

Mevent

Posted

4 hours ago, SocietyTime said:

with the quotes or no?

No

SocietyTime

Posted

10 hours ago, Mevent said:

No

when i do this without quotes, adding the command 'secret give %steamid% Secret Kit'

and its saying "you must specify target player" in console

sorry to bother you with this but i love this plugin and if we can figure this out i plan on leaving a great review

Mevent

Posted

1 minute ago, SocietyTime said:

when i do this without quotes, adding the command 'secret give %steamid% Secret Kit'

and its saying "you must specify target player" in console

sorry to bother you with this but i love this plugin and if we can figure this out i plan on leaving a great review

hmm... Can you show me exactly which buttons you're talking about?

SocietyTime

Posted

ive attached some images. Also i noticed that whenever i put quotation marks into the command field it doesnt save them but seems to remove them immediately. thank you for your help!

secret button.png

syntax.png

Mevent

Posted

Sorry, yes, I double-checked the code, you need to use “{user}” not “%steamid%”. And I would also advise against using “Secret Kit” (with a space) in your command, because the plugin will consider it a separate argument, not a merged word

SocietyTime

Posted

thank you ill give it a try and let you know if it works! so just use "{user}"

  • Love 1
Mevent

Posted

Changed Status from Pending to Closed

1.4m

Downloads

Total number of downloads.

6.8k

Customers

Total customers served.

101.5k

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.