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:
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!
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
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!