Jump to content

Jonas^

Members
  • Posts

    1,016
  • Joined

  • Last visited

  • Days Won

    9

Jonas^ last won the day on May 26 2019

Jonas^ had the most liked content!

Details

  • Gang
    -
  • Location
    Brazil
  • Interests
    Programming/Scripting

Recent Profile Visitors

5,990 profile views

Jonas^'s Achievements

Hard-@ss

Hard-@ss (35/54)

281

Reputation

  1. Não se faça, você tentou alterar seu serial usando algum tipo de spoofer (modificador de vários dados do seu computador) provavelmente seu banimento nunca será retirado, afinal, tentar alterar serial é algo gravissimo e não é facil como você pensava, se você esta tentando apelar pra este tipo de tentativa é sinal que você fez algo de errado, por tanto aceite sua punição.
  2. Pra fazer isso você deve checar se o jogador esta com o modo imortal ativo ou não e se tiver você pode simplesmente cancelar o evento OnClientPlayerDamage Exemplo: client-side local state = false addCommandHandler ("imortal", function () state = (not state) outputChatBox ("Status do modo imortal alterado para '"..(state and "Ativado" or "Desativado").."'.") end) addEventHandler ("onClientPlayerDamage", localPlayer, function (attacker, weapon, bodypart) if (state) then cancelEvent () end end)
  3. Talvez seja melhor fazer desta forma: addCommandHandler ("staffs", function (player, cmd) local admins = getOnlinePlayersFromGroup ("Admin") local superMods = getOnlinePlayersFromGroup ("SuperModerator") if admins == "" then outputChatBox ("Nenhum administrador online no momento!", player, 255, 0, 0) else outputChatBox ("Admins: #FFFFFF"..tostring(admins), player, 255, 0, 0, true) end if superMods == "" then outputChatBox ("Nenhum SuperModerador online no momento!", player, 255, 0, 0) else outputChatBox ("SuperModeradores: #FFFFFF"..tostring(superMods), player, 51, 170, 255, true) end end) function getOnlinePlayersFromGroup (group) local t = {} local players = "" for k, v in ipairs (getElementsByType("player")) do local acc = getPlayerAccount(v) if acc and not isGuestAccount(acc) then local accName = getAccountName(acc) if group and aclGetGroup(tostring(group)) then local g = aclGetGroup(tostring(group)) local isAdmin = isObjectInACLGroup ("user."..accName, g) if isAdmin then if players ~= "" then players = players..", " end; players = players..getPlayerName(v):gsub("#%x%x%x%x%x%x", "") end end end end return players end
  4. Se ele usar desta forma vai dar erro.
  5. Você esta usando eventos server-side em client-side ou ao contrário.
  6. Você pode verificar se alguém já esta ocupando o acento do motorista e cancelar a entrada do mesmo com o evento: OnVehicleEnter
  7. Well, this can happen for a few reasons. What you can and should do is update your computer's drivers. Install the latest version of microssoft .net: https://www.microsoft.com/en-us/download/details.aspx?id=53344 Update Visual C++ And restart your computer and see if the problem persists.
  8. Não é necessário usar isto: outputChatBox(" ", source) -- DÁ UM ESPAÇO EM BRANCO NO CHAT outputChatBox(" ", source) -- DÁ UM ESPAÇO EM BRANCO NO CHAT outputChatBox(" ", source) -- DÁ UM ESPAÇO EM BRANCO NO CHAT outputChatBox(" ", source) -- DÁ UM ESPAÇO EM BRANCO NO CHAT outputChatBox(" ", source) -- DÁ UM ESPAÇO EM BRANCO NO CHAT outputChatBox(" ", source) -- DÁ UM ESPAÇO EM BRANCO NO CHAT outputChatBox(" ", source) -- DÁ UM ESPAÇO EM BRANCO NO CHAT outputChatBox(" ", source) -- DÁ UM ESPAÇO EM BRANCO NO CHAT Para limpar o chat, basta usar: clearChatBox (source) Tem muita coisa errada nesse seu código, foi você mesmo que fez?
  9. Obviamente vai bugar, você esta chamando uma função que provavelmente é a que mostra o painel na sua segunda função. Mostre como esta seu client do painel de login pra gente ver.
  10. Você pode usar triggers para passar informações dos clientes para o servidor e vice-versa. https://wiki.multitheftauto.com/wiki/TriggerServerEvent https://wiki.multitheftauto.com/wiki/TriggerClientEvent
  11. Não esqueça que você esta lidando com o lado servidor, por tanto muita atenção, prevejo problemas nesse seu código. @Perigoso Não se acostume: server-side local eventoAtivado = false -- Variável que vai informar se o evento esta ou não ativo (atualmente desativado). local saveAdmin -- Variável que vai guardar o admin que ativar o evento. function eventoStart (thePlayer, cmd) if isObjectInACLGroup ("user."..getAccountName(getPlayerAccount (thePlayer)), aclGetGroup ("Admin")) then -- Se o player que usar o comando for admin, então: if (eventoAtivado == false) then -- Se o evento não estiver ativado, então: blipEvento = createBlipAttachedTo (thePlayer, 0, 2, 0, 0, 255) -- Seta o blip no admin visível para todos (pois estamos no server então não precisa declarar visibleTo) saveAdmin = thePlayer -- Salva o playerSource na variável saveAdmin para poder cancelar o evento. eventoAtivado = true -- Seta a variável como true (evento ativado). setElementData (saveAdmin, "adminEventoStarted", true) -- Seta a data informando se o admin esta com evento ativo. clearChatBox () -- Limpa o chat pra ser bem visível para todos. outputChatBox ("[INFO] #FFFFFFO(A) admin '#00FF00"..string.gsub(getPlayerName (thePlayer), "#%x%x%x%x%x%x", "").."#FFFFFF' começou o evento mate o admin.", root, 0, 255, 0, true) outputChatBox ("[INFO] #FFFFFFPara ver a localização do admin aperte a tecla #00FF00'F11' #FFFFFFo ponto azul representa a localização exata do admin.", root, 0, 255, 0, true) outputChatBox ("[OBS] #FFFFFFLembrando que o admin tem a opção de revidar a agressão.", root, 255, 50, 50, true) else -- senão: outputChatBox ("[INFO] #FFFFFFO evento já esta ativo para cancelar use #FF3232/estop", thePlayer, 255, 50, 50, true) end end end addCommandHandler ("estart", eventoStart) function eventoStop (thePlayer, cmd) if isObjectInACLGroup ("user."..getAccountName(getPlayerAccount (thePlayer)), aclGetGroup ("Admin")) then -- Se o player que usar o comando for admin, então: if (eventoAtivado == true) then -- Se o evento já estiver ativado, então: removeElementData (saveAdmin, "adminEventoStarted") -- Remove a data informando se o admin esta com evento ativo. if isElement (blipEvento) then -- Se existir o elemento blipEvento, então: destroyElement (blipEvento) -- Retira o blip do admin. end saveAdmin = nil -- Seta a variável como nil ficando inexistente. eventoAtivado = false -- Seta a variável como false (evento desativado). clearChatBox () -- Limpa o chat pra ser bem visível para todos. outputChatBox ("[INFO] #FFFFFFO(A) admin '#FF3232"..string.gsub(getPlayerName (thePlayer), "#%x%x%x%x%x%x", "").."#FFFFFF' cancelou o evento.", root, 255, 50, 50, true) else outputChatBox ("[INFO] #FFFFFFO evento já esta desativado para ativar use #FF3232/estart", thePlayer, 255, 50, 50, true) end end end addCommandHandler ("estop", eventoStop) addEventHandler ("onPlayerWasted", root, function (ammo, attacker, damageType) if (attacker and attacker ~= source) and getElementData (source, "adminEventoStarted") then local killer = getKiller (attacker) -- Variável que chama a função que verifica se elemento é um veículo/player. if killer then -- Se o jogador matou o admin, então: clearChatBox () -- Limpa o chat pra ser bem visível para todos. outputChatBox ("[EVENTO] #FFFFFFO(A) jogador '#FF3232"..string.gsub(getPlayerName (killer), "#%x%x%x%x%x%x", "").."#FFFFFF' matou o admin '#FF3232"..string.gsub(getPlayerName (source), "#%x%x%x%x%x%x", "").."#FFFFFF' e ganhou o evento.", root, 255, 50, 50, true) clearChatBox (killer) -- Limpa o chat somente pra quem matou o admin. outputChatBox ("[EVENTO] #FFFFFFVocê matou o admin '#00FF00"..string.gsub(getPlayerName (source), "#%x%x%x%x%x%x", "").."#FFFFFF' e ganhou o evento.", killer, 0, 255, 0, true) removeElementData (source, "adminEventoStarted") -- Remove a data informando se o admin esta com evento ativo. if isElement (blipEvento) then -- Se o elemento blipEvento existir, então: destroyElement (blipEvento) -- Retira o blip do jogador. end eventoAtivado = false -- Seta a variável como false (evento desativado). end end end) addEventHandler ("onPlayerQuit", root, function () if getElementData (source, "adminEventoStarted") then -- Se o admin estiver com o evento ativo, então: clearChatBox () -- Limpa o chat pra ser bem visível para todos. outputChatBox ("[INFO] #FFFFFFO(A) admin '#FF3232"..string.gsub(getPlayerName (source), "#%x%x%x%x%x%x", "").."#FFFFFF' saiu do servidor e o evento foi cancelado.", root, 255, 50, 50, true) removeElementData (source, "adminEventoStarted") -- Remove a data informando se o admin esta com evento ativo. if isElement (blipEvento) then -- Se o elemento blipEvento existir, então: destroyElement (blipEvento) -- Retira o blip do jogador. end eventoAtivado = false -- Seta a variável como false (evento desativado). end end) addEventHandler ("onResouceStop", root, function () if getElementData (source, "adminEventoStarted") then -- Se o admin estiver com o evento ativo, então: removeElementData (source, "adminEventoStarted") -- Remove a data informando se o admin esta com evento ativo. end end) function getKiller (v) local player if getElementType (v) == "vehicle" then -- Se o elemento for um veículo, então: player = getVehicleController (v) -- Verifica o motorista do veículo. elseif getElementType(v) == "player" then -- Se o elemento for um jogador, então: player = v end return getElementType(player) == "player" and player or false -- Validar se é um jogador e retorna-lo. end
  12. Você disse que era um painel de banir, mas ai é um painel de prender.
  13. Você quer mostrar a hora e data exatamente do inicio do PTR e do final do PTR? Se sim, você deve usar: GetRealTime Um exemplo: function horaReal (thePlayer, cmd) local now = getRealTime() -- Recebe os dados do momento atual. local hours = now.hour local minutes = now.minute local days = now.monthday local months = now.month local years = now.year if (hours < 10) then -- Adiciona um 0 na frente, caso seja menor que 10. hours = "0"..hours end if (minutes < 10) then minutes = "0"..minutes end if (days < 10) then days = "0"..days end if (months < 10) then months = "0"..months end outputChatBox ("Data: "..days.."/"..months + 1 .."/"..years + 1900, thePlayer, 0, 255, 0) outputChatBox ("Hora: "..hours..":"..minutes, thePlayer, 0, 255, 0) outputDebugString ("Data: "..days.."/"..months + 1 .."/"..years + 1900) outputDebugString ("Hora: "..hours..":"..minutes) end addCommandHandler ("hora", horaReal)
×
×
  • Create New...