Solved How to make an ID system with punishment

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

FabricioSouza

Well-Known Member
Mar 15, 2018
267
3
0
25
Versão do Skript: Skript 2.2 (dev23c)
Skript Autor: Bensku
Minecraft Versão: 1.8.9


Estou fazendo um sistema de punição, mas quero que um jogador punido tenha um id, por exemplo: Jhon foi o primeiro jogador a ser banido do meu servidor, já que ele foi o primeiro jogador a ser punido, seu ID será # 1 e assim por diante. Em outras palavras, o ID será colocado de acordo com o local da punição.
 
Last edited:
Since you are using the Help section, could you please use the correct FORMAT for this section.
Thank you
[doublepost=1524254601,1524254332][/doublepost]you could try something like this, obviously edit it to your liking
This is just a basic format for what you need
code_language.skript:
on load:
    if {punishment.amount} is not set:
        set {punishment.amount} to 0

command /ban <player> <text>:
    add 1 to {punishment.amount}
    send "you are #%{punishment.amount}% to be banned from this server" to arg-1
    ban arg-1 with reason arg-2
 
Since you are using the Help section, could you please use the correct FORMAT for this section.
Thank you
[doublepost=1524254601,1524254332][/doublepost]you could try something like this, obviously edit it to your liking
This is just a basic format for what you need
code_language.skript:
on load:
    if {punishment.amount} is not set:
        set {punishment.amount} to 0

command /ban <player> <text>:
    add 1 to {punishment.amount}
    send "you are #%{punishment.amount}% to be banned from this server" to arg-1
    ban arg-1 with reason arg-2

I do not want to know how to have an id for every punished player. For example: You were the 1st player to be banned so your punishment id is # 1 and if I am the second my id will be # 2 and so on.
 
Scroll up, i just did it for you
[doublepost=1524254914,1524254841][/doublepost]if you are wanting it to assign the ID to said player do this
code_language.skript:
on load:
    if {punishment.id} is not set:
        set {punishment.id} to 0

command /ban <player> <text>:
    add 1 to {punishment.id}
    send "you are #%{punishment.id}% to be banned from this server" to arg-1
    ban arg-1 with reason arg-2
    set {punishment.id.%player%} to {punishment.id}
 
Scroll up, i just did it for you
[doublepost=1524254914,1524254841][/doublepost]if you are wanting it to assign the ID to said player do this
code_language.skript:
on load:
    if {punishment.id} is not set:
        set {punishment.id} to 0

command /ban <player> <text>:
    add 1 to {punishment.id}
    send "you are #%{punishment.id}% to be banned from this server" to arg-1
    ban arg-1 with reason arg-2
    set {punishment.id.%player%} to {punishment.id}

The id will be in case the player is punished he will have an id to identify the punishment and the cause of the punishment or as a form of identification. For example:

code_language.skript:
if player is the first to have {banned.% Player%}:
    set {banned.id.% player%.} to # 1
 
[QUOTE = "ShaneBee, post: 29271, member: 5254"] ok, então qual é o problema então? [/ QUOTE]

What I said.
 
then do this
code_language.skript:
on load:
    if {punishment.ban.id} is not set:
        set {punishment.ban.id} to 0

command /ban <player> <text>:
    add 1 to {punishment.ban.id}
    send "you are #%{punishment.id}% to be banned from this server" to arg-1
    ban arg-1 with reason arg-2
    set {punishment.ban.id.%player%} to {punishment.ban.id}
 
[QUOTE = "ShaneBee, post: 29273, member: 5254"] então faça isso
[CODE = SKRIPT] no carregamento:
if {punishment.ban.id} não está definido:
set {punishment.ban.id} para 0

comando / ban <player> <text>:
adicione 1 a {punishment.ban.id}
envie "você é #% {punishment.id}% a ser banido deste servidor" para arg-1
ban arg-1 com razão arg-2
set {punishment.ban.id.% player%} para {punishment.ban.id} [/ CODE] [/ QUOTE]

And if he is the second player to be punished.
 
its already done that way
hence this part "add 1 to {punishment.ban.id}"
it will add 1 each time a player is banned.... and then this
"set {punishment.ban.id.%player%} to {punishment.ban.id}"
will assign that number to the persons BAN ID
[doublepost=1524256456,1524255725][/doublepost]If this issue has been solved, please make sure to click "best answer" or change the prefix to SOLVED
 
[QUOTE = "ShaneBee, post: 29275, membro: 5254"] já feito dessa forma
daí essa parte "add 1 to {punishment.ban.id}"
ele adicionará 1 cada vez que um jogador for banido ... e então isso
"set {punishment.ban.id.% player%} para {punishment.ban.id}"
atribuirá esse número às pessoas BAN ID [/ QUOTE]

I think I understood in this part:
add 1 to {punishment.ban.id} will add 1 to the id variable but when I ban another player will add another 1 and will get two.
 
ta certo o código dele... vc q ta com frescura '0'

kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
[doublepost=1524275752,1524265992][/doublepost]I think this is impossible.
[doublepost=1524277749][/doublepost]Folks I want to make a ban system with ID and I use this ID to identify the player punished.
 
[QUOTE = "Normalguy, post: 29297, member: 6317"] Você quer um número aleatório ou não? [/ QUOTE]


I wanted it to be the punishment number for example: The first player banned from my server will have ID # 1 because he was the first and the second player to be banned will have ID # 2 and so on.
 
Ummm I think someone already answered it
U mean
Ban player due to “ID #(banid.%uuid%)”
 
[QUOTE = "Normalguy, post: 29299, membro: 6317"] Hummm, eu acho que isso já respondido
você quer dizer
Banir jogador devido a “ID # (banid.% Uuid%)” [/ QUOTE]

I do not want with uuid.
 
Status
Not open for further replies.