Help with the fuction

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

0hTristezzah

Member
Mar 28, 2022
15
0
1
23
options:
scadenza: 3 days
p: &8[&9&lMulte&8]

command /multa [<string>] [<player>] [<text>] [<text>]:
trigger:
if arg 1 is "stampa":
if arg 2 is set:
if arg 3 is set:
if arg 4 is set:
add 1 of Multa(player, arg-2,) to player's inventory
send message "{@p} &bHai ricevuto una multa" to arg 2
send message "{@p} &9Multa eseguita con successo" to sender
else:
send message "{@p} &bInserisci il motivo" to player
else:
send message "{@p} &bInserisci il prezzo" to player
else:
send message "{@p} &bInserisci un nickname" to player
else if arg 1 isn't "stampa":
send message "&bComando errato /multa stampa" to player



function Multa(a: player, c: player, o: number, e: text ) :: item:
set {_v} to a written book
set {multa::id::%{_id}%::autore} to {_a}
set {multa::id::%{_id}%::multato} to {_c}
set {multa::id::%{_id}%::emoji_stuck_out_tongue:rezzo} to {_o}
set {multa::id::%{_id}%::motivo} to {_e}
set {multa::id::%{_id}%::scadenza} to {@scadenza} after now
set {passaporto::emoji_stuck_out_tongue:layer::%{_v}%} to {_id}
add 1 to {_id}
set {_t} to " {@p}%nl%"
set {_t} to "%{_t}%&8&l----------------%nl%%nl%"
set {_t} to "%{_t}%&8ID: &c##%{_id}%%nl%"
set {_t} to "%{_t}%&8Autore: &c%{_a}%%nl%"
set {_t} to "%{_t}%&8Cittadino: &c%{_c}%%nl%"
set {_t} to "%{_t}%&8Motivo: &c%{_e}%%nl%"
set {_t} to "%{_t}%&8Prezzo: &c%{_o}%%nl%"
set {_now} to now formatted as "dd/MM/yyyy"
set {_t} to "%{_t}%&8Data: &c%{_now}%%nl%%nl%"
set {_now} to now
add {@scadenza} to {_now}
set {_now} to {_now} formatted as "dd/MM/yyyy"
set {_t} to text component of "%{_t}%&7&oScadenza: %{_now}%"
set page 1 of book {_v} to {_t}
set book author of {_v} to "&9&lGoverno"
set book title of {_v} to "&9&lMULTA"
set 1st line of {_v}'s lore to "&8ID: &0%{_id}%"
return {_v}


upload_2022-9-1_16-23-16.png

[doublepost=1662042574,1662042198][/doublepost]i try with Multa(player, arg-2, arg-3, arg-4) but dont work
 
Last edited:
Status
Not open for further replies.