Jump to content

Is it possible to have 2 variables such as to %player% from %player%


uwuMehu

Recommended Posts

I would like to have a command that gives a player an item from an admin or any staff member so

To: player

From: admin My code so far is: 

command /test [<player>]:
  trigger:
    give a wooden shovel of protection 1 with hidden enchants flag with name "&9Ladel" with lore "&7Forged by an the hands of" and "&7a Staff Member" and "&7Given to  %player%" and "&8Given by" to player-arg #This last bit is where im confused, how would I make it from someone to someone 

 

image.png

Link to comment
Share on other sites

%player% stands for the player that executes the cmd or event or something 

for the 2nd player which is the <player> thing u have in ur skript, that would be %arg-1% or u could do %arg% only if theres one arg

 

so ur skript should be 

 

command /test [<player>]:
    trigger:
        give a wooden shovel of protection 1 with hidden enchants flag with name "&9Ladel" with lore "&7Forged by the legendary hands of" and "&7a Staff Member" and "&7Given to: %arg-1%" and "&&Given by: %player%"
Link to comment
Share on other sites

Just now, sorryffs said:

%player% stands for the player that executes the cmd or event or something 

for the 2nd player which is the <player> thing u have in ur skript, that would be %arg-1% or u could do %arg% only if theres one arg

 

so ur skript should be 

 

command /test [<player>]:
    trigger:
        give a wooden shovel of protection 1 with hidden enchants flag with name "&9Ladel" with lore "&7Forged by the legendary hands of" and "&7a Staff Member" and "&7Given to: %arg-1%" and "&&Given by: %player%"

or i couldve said this

 

command /example: <ex> <ex> <ex> <ex>

                                 arg-1 arg-2 arg-3 arg-4

 

im bad at explinaing things lolol

  • Thanks 1
Link to comment
Share on other sites

its fine it worked, would this work with essentials chat so if I gave it to a player it would be like From [Admin] Mehu

                                                                                                                                                                        [Member] Player

Link to comment
Share on other sites

1 minute ago, uwuMehu said:

its fine it worked, would this work with essentials chat so if I gave it to a player it would be like From [Admin] Mehu

                                                                                                                                                                        [Member] Player

idk lol. ive never used essentials for that stuff, 

Link to comment
Share on other sites

24 minutes ago, uwuMehu said:

its fine it worked, would this work with essentials chat so if I gave it to a player it would be like From [Admin] Mehu

                                                                                                                                                                        [Member] Player

If you want the rank shown up too, do %player's prefix% %player%

Discord - tarna256

In-game name - _Tarna_

Website - https://tarna.dev
Paste Site: https://paste.tarna.dev

---------------------------------------------------------

[VIP] - 7/27/2020

Community Support - 7/8/20 | 11/3/20

Helper  - 11/3/20 - 2/21/21

Moderator - 2/21/21 - 5/17/21

❤️ - 5/17/21 - now

Moderator - 12/20/22 - now

---------------------------------------------------------

image.png.70849a9b84e0347ce107b8e3eaee312c.pngimage.png.2111009afbd8bef10966ba9ede35a199.png

Link to comment
Share on other sites

adding that just made the script have an error

command /test [<player>]:
    trigger:
        give a wooden shovel of protection 1 with hidden enchants flag with name "&9Ladel" with lore "&7Forged by the legendary hands of" and "&7a Staff Member" and "&8Given to: %arg-1% &8Edition 1" and "&8Given by: %player's prefix% %player%" to player

 

Link to comment
Share on other sites

1 minute ago, uwuMehu said:

adding that just made the script have an error


command /test [<player>]:
    trigger:
        give a wooden shovel of protection 1 with hidden enchants flag with name "&9Ladel" with lore "&7Forged by the legendary hands of" and "&7a Staff Member" and "&8Given to: %arg-1% &8Edition 1" and "&8Given by: %player's prefix% %player%" to player

 

What's the error? and make sure you also have vault since that is needed to use things like %player's prefix%.

Discord - tarna256

In-game name - _Tarna_

Website - https://tarna.dev
Paste Site: https://paste.tarna.dev

---------------------------------------------------------

[VIP] - 7/27/2020

Community Support - 7/8/20 | 11/3/20

Helper  - 11/3/20 - 2/21/21

Moderator - 2/21/21 - 5/17/21

❤️ - 5/17/21 - now

Moderator - 12/20/22 - now

---------------------------------------------------------

image.png.70849a9b84e0347ce107b8e3eaee312c.pngimage.png.2111009afbd8bef10966ba9ede35a199.png

Link to comment
Share on other sites

26 minutes ago, uwuMehu said:

skvault?

 

no. just vault

Discord - tarna256

In-game name - _Tarna_

Website - https://tarna.dev
Paste Site: https://paste.tarna.dev

---------------------------------------------------------

[VIP] - 7/27/2020

Community Support - 7/8/20 | 11/3/20

Helper  - 11/3/20 - 2/21/21

Moderator - 2/21/21 - 5/17/21

❤️ - 5/17/21 - now

Moderator - 12/20/22 - now

---------------------------------------------------------

image.png.70849a9b84e0347ce107b8e3eaee312c.pngimage.png.2111009afbd8bef10966ba9ede35a199.png

Link to comment
Share on other sites

34 minutes ago, uwuMehu said:

also if I wanted like edition #1 it wont work cause # is to type in the code could I bypass this somehow?

if u do ## instead of # it should work (it only works if ur text is in "", and not '')

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...