Hyper Scripts - MTA
Nosso siteDiscord
  • 🔹Hyper Scripts
    • 💼Sobre nós
    • ☎️Contato
  • 📃Documentação
    • 🧠Wiki
      • 🚘Concessionária
        • ⚙️Concessionária
      • 📖Inventário
        • ⚙️Inventory
      • 🪪Identidade
        • ⚙️Identidade
      • 🏦Banco
        • ⚙️Banco
      • 💡Notify
        • ⚙️Infobox
      • 🎧Spotify
        • ⚙️Spotify
      • 🛒Empresas
        • ⚙️Empresas
      • 💰API Mercado pago
        • ⚙️QR Code
      • 🔫Porte de armas
        • ⚙️Porte de armas
      • 📌Punir
        • ⚙️Punir
      • 🫀Assets
        • ⚙️Send text
        • ⚙️Progress
        • ⚙️Confirmation
        • ⚙️Smooth Camera
        • ⚙️Logs
      • 🆔Gerenciamento + ID
        • ⚙️ID
      • 🚘Textura Compartilhada
        • ⚙️TXD
      • 📌Target
        • ⚙️Target
      • 📈Grupos
        • ⚙️Grupos
      • 🚨Policial
        • ⚙️Policial
  • 🚧Atualizações
    • 🚦Status
    • 🐛Changelogs
  • ⁉️Dúvidas Frequentes
    • 👾Ativando produto
      • 🐞Instalação do módulo
      • ⚠️Erros de ativação
      • 🔑Alterar IP
      • *️⃣Permissão Admin
      • 🔻fetchRemote
    • ⭐Plano Unlimited
      • ⚠️Como funciona?
      • 🔑Alterar IP
  • 📸Social links
    • Instagram
    • Discord
    • Facebook
  • 📜Termos
    • Nossos termos
Powered by GitBook
On this page
  1. Documentação
  2. Wiki
  3. Punir

Punir

Acompanhe abaixo as nossas exports juntamente com exemplos de funcionamento e as instruções precisas para realizar a exportação de forma correta.

Exports:

exports['[HS]Painel_Punir']:setBanimentoId( player, 'id', 'Motivo', 'Minuto', 1 )
exports['[HS]Painel_Punir']:setPrenderId( player, 'id', 'Motivo', 'Minuto', 1 )
exports['[HS]Painel_Punir']:romoveBanSerial( serial )
exports['[HS]Painel_Punir']:send_mensagem( player, alvo, msg )
exports['[HS]Painel_Punir']:getBanimentos(  )

setBan

addCommandHandler('setarban', function( player, _, id, tipo_timer, tempo, ... )
     local assets = exports['[HS]Assets']
     if id and tonumber( id ) >= 0 then
          if tipo_timer and tipo_timer ~= '' then
               if tempo and tonumber( tempo ) >= 1 then
                    local motivo = table.concat( { ... }, ' ' )
                    if motivo ~= '' then
                         local punir = exports['[HS]Painel_Punir']
                         if punir:setBanimentoId( player, id, motivo, tipo_timer, tonumber( tempo ) ) then
                              assets:outputMessage( player, 'O player foi banido com sucesso.', 'success')
                         end
                    else
                         assets:outputMessage( player, 'Digite um texo.', 'info' ) 
                    end
               else
                    assets:outputMessage( player, 'Digite um tempo maior que 0.', 'info' ) 
               end
          else
               assets:outputMessage( player, 'Digite o formato do timer.', 'info' ) 
          end
     else
          assets:outputMessage( player, 'Digite um id valido.', 'info' ) 
     end
end)

setPrender

addCommandHandler('setarprender', function( player, _, id, tipo_timer, tempo, ... )
     local assets = exports['[HS]Assets']
     if id and tonumber( id ) >= 0 then
          if tipo_timer and tipo_timer ~= '' then
               if tempo and tonumber( tempo ) >= 1 then
                    local motivo = table.concat( { ... }, ' ' )
                    if motivo ~= '' then
                         local punir = exports['[HS]Painel_Punir']
                         if punir:setPrenderId( player, id, motivo, tipo_timer, tonumber( tempo ) ) then
                              assets:outputMessage( player, 'O player foi preso com sucesso.', 'success')
                         end
                    else
                         assets:outputMessage( player, 'Digite um texo.', 'info' ) 
                    end
               else
                    assets:outputMessage( player, 'Digite um tempo maior que 0.', 'info' ) 
               end
          else
               assets:outputMessage( player, 'Digite o formato do timer.', 'info' ) 
          end
     else
          assets:outputMessage( player, 'Digite um id valido.', 'info' ) 
     end
end)

removeBan

addCommandHandler( 'removeban', function( player, _, serial )
     if serial and serial ~= '' then
          local assets = exports['[HS]Assets']
          local punir = exports['[HS]Painel_Punir']
          local banido = punir:romoveBanSerial( serial )
          if banido == '' then
               assets:outputMessage( player, 'Esse serial não contem banimento.', 'success' )
          elseif banido == 'banido' then
               assets:outputMessage( player, 'Você removeu o ban do serial.', 'success' )
          elseif banido == 'preso' then
               assets:outputMessage( player, 'Você removeu o preso.', 'success' )
          end
     end
end)

sendMessage

addCommandHandler( 'sendmensage', function( player, _, id, ... )
     if id and motivo ~= '' then
          local motivo = table.concat( { ... }, ' ' )
          local alvo = assets:getPlayerID( id )
          if alvo then
               local punir = exports['[HS]Painel_Punir']
               punir:send_mensagem( player, alvo, motivo )
          end
     end
end)

getBanimentos

addCommandHandler( 'getbanimentos', function( player )
     local punir = exports['[HS]Painel_Punir']
     local banimentos = punir:getBanimentos(  )
     iprint( banimentos )
end)
PreviousPunirNextAssets

Last updated 1 year ago

📃
🧠
📌
⚙️