Jump to content

Having trouble giving a specific player an item. (Basketball Game)


JustSeadragon

Recommended Posts

My skript keeps messing up because I've tried 2 things. 

The first thing was to assign variables to it:

command /basketball <offlineplayer> <offlineplayer>:
    trigger:
        player1 = "%arg-1%"
        player2 = "%arg-2%"
        send "&d%arg-1% and %arg-2% are playing a basketball match."
        give stick named "&dTackle" to player1
        give stick named "&dTackle" to player2
        give stick named "&dPass" to player1
        give stick named "&dPass" to player2

Then the second thing was to just do the simple thing:

command /basketball <offlineplayer> <offlineplayer>:
    trigger:
        send "&d%arg-1% and %arg-2% are playing a basketball match."
        give stick named "&dTackle" to %arg-1%
        give stick named "&dTackle" to %arg-2%
        give stick named "&dPass" to %arg-1%
        give stick named "&dPass" to %arg-2%

Nothing worked. Please help!

Ⓢⓔⓐⓓⓡⓐⓖⓞⓝ

Link to comment
Share on other sites

28 minutes ago, JustSeadragon said:
command /basketball <offlineplayer> <offlineplayer>:
    trigger:
        send "&d%arg-1% and %arg-2% are playing a basketball match."
        give stick named "&dTackle" to %arg-1%
        give stick named "&dTackle" to %arg-2%
        give stick named "&dPass" to %arg-1%
        give stick named "&dPass" to %arg-2%
command /basketball <offlineplayer> <offlineplayer>:
    trigger:
        send "&d%arg-1% and %arg-2% are playing a basketball match." to player
        give stick named "&dTackle" to arg-1
        give stick named "&dTackle" to arg-2
        give stick named "&dPass" to arg-1
        give stick named "&dPass" to arg-2

I dont think that will work, but try it

Edited by Lapzzo

 

imgonline-com-ua-resize-CNNkL1drx5M-removebg-preview.png.d6a8ae8b5eb862005fb056c21f934200.png

Link to comment
Share on other sites

command /basketball <player> <player>:
    trigger:
        broadcast "&d%arg-1% and %arg-2% are playing a basketball match."
        add stick named "&dTackle" to arg-1's inventory
        add stick named "&dTackle" to arg-2's inventory
        add stick named "&dPass" to arg-1's inventory
        add stick named "&dPass" to arg-2's inventory

This should work. Let me know if it doesn't.

Here is what you did wrong:

  1. In the last 4 lines arg-1 and arg-2 should not be converted into strings and thus do not need the %%.
  2. Offline players cannot play basketball against each other so the command should use the <player> argument.
  3. I am not sure if "send <string>" is valid syntax so I replaced it with what I know should work. ("broadcast <string>)
  4. I am not sure if the "give <item> <player>" syntax works so I replaced it with what I know should work.

Owner of oldgaffle.minehut.gg. (my paintball server)

Owner of karted.minehut.gg. (my mario kart server)

Advocate of individual freedom, especially freedom of speech.

Cooler than Stalemate128.

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...