1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT??:

    You can always check our our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Solved How not to ban players who never entered my server.

Discussion in 'Skript' started by FabricioSouza, Mar 17, 2018.

Thread Status:
Not open for further replies.
  1. F

    FabricioSouza Well-Known Member

    Joined:
    Mar 15, 2018
    Messages:
    267
    Likes Received:
    3
    Someone help me with a skript I did, I made a / ban, and / unban, and the commands are like this: / ban <offline player> <Text>, my problem is that I can ban players that never entered on my server, and I just want to ban online players and players who have already logged into my server but are offline. Someone helps me solve this problem.
     
  2. Donut

    Addon Developer

    Joined:
    Mar 27, 2017
    Messages:
    1,340
    Likes Received:
    175
    Medals:
    Code (Skript):
    1. if arg-1 has played before:
     
  3. F

    FabricioSouza Well-Known Member

    Joined:
    Mar 15, 2018
    Messages:
    267
    Likes Received:
    3
    With that then I will not be able to ban players who have never entered my server, right.
     
  4. Wynnevir

    Wynnevir Well-Known Member

    Joined:
    Jul 9, 2017
    Messages:
    974
    Likes Received:
    57
    It will only register them as having played before if they have entered your server, so yes.^-^
     
  5. F

    FabricioSouza Well-Known Member

    Joined:
    Mar 15, 2018
    Messages:
    267
    Likes Received:
    3
    [QUOTE = "Wynnevir, post: 27647, member: 4016"] Ele só irá registrá-los como tendo jogado antes se eles inseriram seu servidor, então sim. ^ - ^ [/ QUOTE]

    But when I put what he said it did not work out, if arg- 1 has played before this server for players who have already logged into my server. And my problem is to be able to ban players who have never entered my server and I just want to ban those who are online and those who have already logged in to my server only if they are offline.
     
  6. Wynnevir

    Wynnevir Well-Known Member

    Joined:
    Jul 9, 2017
    Messages:
    974
    Likes Received:
    57
    When you say it didn't work out, do you mean it didnt work at all and you could still ban players who had never joined?
    Not quite sure I understand you.
     
  7. F

    FabricioSouza Well-Known Member

    Joined:
    Mar 15, 2018
    Messages:
    267
    Likes Received:
    3
    [QUOTE = "Wynnevir, post: 27649, member: 4016"] Quando você diz que não funcionou, você quer dizer que não funcionou e você ainda pode proibir jogadores que nunca se juntaram?
    Não tenho certeza de que te entendo. [/ QUOTE]

    Yes.
     
  8. Wynnevir

    Wynnevir Well-Known Member

    Joined:
    Jul 9, 2017
    Messages:
    974
    Likes Received:
    57
    It's not as ideal, but you could add the player to a list when they join and check to see if that name is on the 'played before' list before it lets you ban them perhaps
     
  9. F

    FabricioSouza Well-Known Member

    Joined:
    Mar 15, 2018
    Messages:
    267
    Likes Received:
    3
    [QUOTE = "Wynnevir, post: 27651, membro: 4016"] Não é tão ideal, mas você pode adicionar o jogador a uma lista quando se juntar e verificar se esse nome está na lista 'jogado antes' antes que ele deixe Você proibi-los talvez [/ QUOTE]

    I would not want to make a list. So that means i can not ban players who never server.
     
  10. Wynnevir

    Wynnevir Well-Known Member

    Joined:
    Jul 9, 2017
    Messages:
    974
    Likes Received:
    57
    Hmm, maybe it's an issue with the original code. Want to post the code that uses the 'player has played before' line? If I don't spot something wrong then maybe Donut or someone else will
     
  11. F

    FabricioSouza Well-Known Member

    Joined:
    Mar 15, 2018
    Messages:
    267
    Likes Received:
    3
    [QUOTE = "Wynnevir, post: 27653, membro: 4016"] Hmm, talvez seja um problema com o código original. Deseja publicar o código que usa a linha 'jogador jogou antes'? Se eu não detectar algo errado, talvez Donut ou outra pessoa [/ QUOTE]

    My problem is that I can ban players that have never entered my server.
     
    #11 FabricioSouza, Mar 17, 2018
    Last edited: Mar 17, 2018
  12. Wynnevir

    Wynnevir Well-Known Member

    Joined:
    Jul 9, 2017
    Messages:
    974
    Likes Received:
    57
    erm sorry I don't speak that language, spanish?
     
  13. F

    FabricioSouza Well-Known Member

    Joined:
    Mar 15, 2018
    Messages:
    267
    Likes Received:
    3
    My problem is that I can ban players that have never entered my server.
     
  14. Wynnevir

    Wynnevir Well-Known Member

    Joined:
    Jul 9, 2017
    Messages:
    974
    Likes Received:
    57
    Post your code
     
  15. F

    FabricioSouza Well-Known Member

    Joined:
    Mar 15, 2018
    Messages:
    267
    Likes Received:
    3
    [QUOTE = "Wynnevir, post: 27657, member: 4016"] Publique seu código [/ QUOTE]





    command / ban [<Offline Player>] [<Text>]:
    permission: skript.punir
    permission message: &cVocê precisa do grupo Moderador ou Superior para executar este comando.
    desencadear:
    se {banned.% arg 1%} for verdadeiro:
    mensagem ""
    parece
    se arg-1 e arg-2 não estiverem configurados:
    send "&cUtilize /punir <jogador> <motivo>"
    se o arg-1 não tiver jogado antes: # I know you're wrong.
    enviar "& c Este jogador nunca entrou no nosso servidor".


    Para começar eu sou: BRASILEIRO.
     
  16. Wynnevir

    Wynnevir Well-Known Member

    Joined:
    Jul 9, 2017
    Messages:
    974
    Likes Received:
    57
    Sorry, I still don't speak this language. Hopefully someone on the forum does and can help.
     
  17. HackerOTVW

    HackerOTVW Well-Known Member

    Joined:
    Sep 10, 2017
    Messages:
    91
    Likes Received:
    1
    If your meaning is: You want to ban players who have never joined your server, you can try this:
    Code (Skript):
    1. if arg-1 has played before:
    2.     #some code
    3. else: # It means arg-1 never joined your server before
    4.     #some code
    There are still other problem?
     
  18. F

    FabricioSouza Well-Known Member

    Joined:
    Mar 15, 2018
    Messages:
    267
    Likes Received:
    3
    On the contrary, I do not want to ban players who have never entered my server.
    --- Double Post Merged, Mar 17, 2018, Original Post Date: Mar 17, 2018 ---
    Thanks, can you get as solved.
     
  19. Wynnevir

    Wynnevir Well-Known Member

    Joined:
    Jul 9, 2017
    Messages:
    974
    Likes Received:
    57
    To solve it out, edit your thread and change the status in the title.
     
Thread Status:
Not open for further replies.
Loading...