Argument to variable

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

Cookiewhite

Member
Jun 8, 2017
1
0
0
27
Hi, im making an alert plugin on Skript.
My idea is: that an administrator can put the alert, with a command (/newadd <number> <string>).
Well, i want to almacenate an argument, (argument 2, <string>).
I dont know what is the metod to almacenate the argument with variables...
Here is the code:
Code:
command /newadd <number> <string>:
  trigger:
    if arg-1 is 1:
      set {alertmessage} to false
      add string-argument to {argu2}
      send "&e%{argu2}%" to player
      loop {argu2::*}:
        if {argu2::%loop-index%} is true:
          set {alertmessage} to true
          send "&eThe alert message is: %loop-index%." to player
        if {alertmessage} is false:
          send "&eNo hay ningun mensaje en la lista" to player

#Here, if you want to see the news, with the command /novedades, it shows to you the news.
command /novedades:
  trigger:
    send "%{alertmessage}%" to player
    stop
If you put, for example.. /newadd 1 Hi, we update the server!
I want to almacenate the "Hi, we update the server!", for next, if you put /novedades, it shows to you the text putted by an admin with /newadd 1.
Sorry for my english, im spanish xd.
Thanks!
 
Status
Not open for further replies.