Fines list

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

Deku

Member
Jul 12, 2020
36
0
6
19
I would like to make commands to add the fine (already done), to remove it and to see the fines of that particular player .. How can I put a list of fines to that player? Here is my code for now

Code:
command /multa [<player>] [<text>]:
    usage: &cUso corretto: /multa (Player) (Motivo)
    permission: fdo.registra.multa
    permission message: &cNessun Permesso.
    trigger:
        set {_multe} to "Multe"   
        set {_dataa} to "%now%"           
        if arg-1 is not set:
            send "&cNon hai inserito il giocatore!"
        else:
        loop all players:
            add loop-player to {multe::%arg-1%::*}       
            set {_player} to "%arg-1%"
            set {motivo::%arg-1%} to arg 2       
            set {agente::%executor%} to executor                   
            if arg-2 is not set:
                send "&cNon hai messo il motivo" to executor   
            else:
                send "&c&lHai aggiunto una multa a %{_player}%" to executor           

    
command /multe [<player>]:
    usage: &cUso corretto: /multe (Player) per vedere la lista delle multe di un player
    permission: fdo.vedi.multa
    permission message: &cNessun Permesso.
    trigger:
        if "%{multe::%arg-1%::*}%" contains "%arg-1%":
            set {_multe} to "Multe"   
            set {_dataa} to "%now%"
            if arg-1 is not set:
                send "&cNon hai inserito il giocatore!"
            else:
                set {_player} to "%arg-1%"
                set {_scadenza} to now
                add 5 day to {_scadenza}           
                send "&c&lMulte di %arg-1%" to executor
                send "" to executor
                send "&cMultato: &7%{_player}%"
                send "&cData: &7%{_dataa}%"
                send "&cMotivo: &7%{motivo::%arg-1%}%"
                send "&cScadenza: &7%{_scadenza}%"
                send "&cFatta da: &7%{agente::%executor%}%" to executor
            stop   
        else:   
            send "&c&lQuesto giocatore non ha multe!"

            
command /unmulta [<player>]:
    usage: &cUso corretto: /unmulta (Player) per rimuovere le multe
    permission: fdo.vedi.multa
    permission message: &cNessun Permesso.
    trigger:   
        if "%{multe::%arg-1%::*}%" does not contain "%arg-1%":
            send "&c&lQuesto giocatore non ha multe, quindi non puoi rimuoverne!"
            stop
        if arg-1 is not set:
            send "&cNon hai inserito il giocatore!"
        else:
            clear {multe::%arg-1%::*}
            send "&c&lHai rimosso una multa da %arg-1%&c&l!"
 
Status
Not open for further replies.