Jump to content

Matheus.

Members
  • Posts

    1
  • Joined

  • Last visited

Everything posted by Matheus.

  1. Oi, estou a bastante tempo tentando solucionar um problema em um script e não estou conseguindo. O script é de contagem regressiva, e eu estou tentando por para que somente "X" acl possa utilizar o comando, que até então, o script está permitindo que todos utilizem. este é o script virgem, sem as minhas modificações falhas; countdRunning = false function conteoTick (thePlayer) se restante == 0 then killTimer (conteoTimer) playSoundFrontEnd (root, 45) outputChatBox ("VAI VAI VAI!", root, 0,188,0) countdRunning = false else playSoundFrontEnd (root, 44) local factorGreen = 255 / (countdStart-1) local resultadoGreen = factorGreen * restante-factorGreen local factorSpaces = 12 / (countdStart-1) local resultSpaces = math.floor (factorSpaces * restante-factorSpaces) local permanentStr = "" para i = 0, resultSpaces do restanteStr = restanteStr .. "" end restanteStr = restanteStr .. restante outputChatBox (restanteStr, root, 255, resultadoGreen, 0) restante = restante - 1 end end addCommandHandler ("contar", função (thePlayer, cmd, startArg) --addCommandHandler ("countd", função (thePlayer , cmd, startArg) --addCommandHandler ("contagem regressiva", função (thePlayer, cmd, startArg) --addCommandHandler ("conteo", função (thePlayer, cmd, startArg) se countdRunning then outputChatBox ("Já existe uma contagem regressiva atual" , thePlayer) return else if startArg and tonumber (startArg) then countdStart = tonumber (startArg) else countdStart = 3 end if countdStart ~ = 3 and countdStart ~ = 4 then outputChatBox ("Disponível apenas: 3 e 4", thePlayer, 255,0,0) return end restante = countdStart outputChatBox (getPlayerName (thePlayer) .. "# FF8C00começouçou uma contagem regressiva ", root, 255.255.255 , true) conteoTick (thePlayer) conteoTimer = setTimer (conteoTick, 1000,0, thePlayer) countdRunning = true end end)
×
×
  • Create New...