Discord Thread Counter

  • 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 community!

    Now, what are you waiting for? Join the community now!

This thread came from the skUnity Discord. You can't reply to it here but if you join the skUnity Discord, you'll be able to post a reply there. The thread link is part of the thread's message.
Status
Not open for further replies.
like i said, i have a command that sets the time the player must be online
code_language.skript:
js
command /yetkilisure [<text>] [<int>]: 
    trigger:
        if arg-1 is player: 
            if arg-2 is not 0:      
                if arg-2 is set:
                    set {sure.%player%} to arg-2
                    send "&eBaşarı ile &7%arg-1% &eadlı yetkilinin gerekli aktiflik süresi &c%{sure.%player%}% dakika &eolarak değiştirildi."
                    send "%{sure.%player%}%"

            if arg-2 is 0:
                if arg-2 is set:
                    send "&eBaşarı ile &7%arg-1% &eadlı yetkilinin gerekli aktiflik süresi &4sıfırlandı." 
                    set {sure.%player%} to 0
                    add arg-1 to {mods::server} 
                    send "%{sure.%player%}%"
            if arg-2 is not set:
                if {sure.%player%} is 0:
                    send "&eBu yetkili için süre &4ayarlanmamış."
                if {sure.%player%} is not 0:
                    send "&3%arg-1% &eyetkilisinin kalan aktiflik süresi &1%{sure.%player%}% dakika &ekaldı."
                    send "%{sure.%player%}%"
            
#quit protection ayarlanacak mods server düzeltilecek      
on join:
    send "sa"
    broadcast "Current server time: %now%"
    set {mods::server} to "bosluk"
    set {sayac.%player's uuid%} to 0
    set {quitp} to 0 
    broadcast random element of {mods::server}
    send "&eAyarlanan gerekli aktiflik süreniz başlamıştır." if {sure.%player%} is not 0

    while {sayac.%players's uuid%} is not {sure.%player%}*60:
        add 1 to {sayac.%players's uuid%}   
        send "%{sayac.%player's uuid%}%"
        if {sayac.%player's uuid%} is {sure.%player%}*60:
            broadcast "&e%player% yetkili süresini başarıyla tamamladı."
        wait 1 second
this code's "on join" side, starts a counter starts with 0 to the variable that i set

Posted by: dawnbringer01 from the skUnity Discord.
 
technically the order of your while loop is no better than

code_language.skript:
if
    while

Posted by: fusezion from the skUnity Discord.
 
Status
Not open for further replies.