Jonas^
-
Posts
1,016 -
Joined
-
Last visited
-
Days Won
9
Posts posted by Jonas^
-
-
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)
-
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
- 1
-
20 hours ago, M4DD NØG said:
Com isso você consegue fazer, isObjectInACLGroup
if isObjectInACLGroup("user." ..getAccountName(getPlayerAccount(source)), aclGetGroup("Admin")) thenSe ele usar desta forma vai dar erro.
-
Você esta usando eventos server-side em client-side ou ao contrário.
- 1
-
Você pode verificar se alguém já esta ocupando o acento do motorista e cancelar a entrada do mesmo com o evento:
-
-
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.
-
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?
-
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.
-
Você pode usar triggers para passar informações dos clientes para o servidor e vice-versa.
- 1
- 1
-
On 12/04/2021 at 14:55, KronoS Lettify said:
Isso não seria um evento, mas sim um script.
Abaixo está um código que simularia o quê você precisa:
local alvos = {} addCommandHandler('memate', function (player, cmd) if (isObjectInACLGroup('user.'..getAccountName(getPlayerAccount(player)), aclGetGroup('Admin'))) then if (not alvos[player]) then alvos[player] = createBlipAttachedTo(player, 0, 4, 255, 0, 0, -1, 65535) print('Mate o ADMIN e ganhe recompensas!') else print('Você já está marcado!') end end end ) addEventHandler('onPlayerWasted', root, function (_, killer) if (alvos[source] and killer) then destroyElement(alvos[source]) alvos[source] = nil print('O ADMIN foi morto por *killer') --DÊ A RECOMPENSA AQUI! end end )
Não esqueça que você esta lidando com o lado servidor, por tanto muita atenção, prevejo problemas nesse seu código.
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
- 1
-
Você disse que era um painel de banir, mas ai é um painel de prender.
-
On 22/02/2021 at 19:19, andr0xy said:
Seja mais específico e já mostre parte do código que seja relevante para que outros possam te ajudar. Relate o problema.
-
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)
-
On 01/12/2020 at 09:14, Beaver_MC said:
Eu queria criar um script para chamar staff, exemplo: um player digita /staff, e aparece pros staffs, dar tp e ajudar ele...
Alguém pode me ajudar ?Faça da forma que o @HiroShi explicou, caso não consiga, mostre o que você tentou fazer para nos corrigirmos.
-
OBS: Esta função já desabilita as teclas de chat e a tecla do painel admin.
-
Beleza, mas qual a finalidade disto? já tem a aba no painel admin.
-
-
Você pode fazer isso com SetElementAlpha para deixar o objeto totalmente transparente use 140;
-
-
Just now, LeoHiroshi said:
tem algum gta para me indicar? é o segundo que eu baixo e continua o msm problema
Eu uso o original da steam, inclusive ele esta em promoção neste exato momento esta apenas 7,17 reais, mas caso não possa comprar no momento no youtube deve ter alguns videos ensinando baixar algum crackado.
-
Após fazer tudo isso que o Lord citou, também procure baixar outro GTA, se você tiver use o da steam.
-
From what I realized the gamemode is divided into resources, in the following folder, '' [vultaic] '', in this case you will have to add a line for each resource on the mtaserver
-
Não existe localPlayer do lado servidor.
function IniRotaUm (thePlayer) setElementVisibleTo(blipMidRota1, thePlayer, true) setElementVisibleTo(MarkerRota1Mid, thePlayer, true) end addEvent ("RotaUm", true) addEventHandler ("RotaUm", root, IniRotaUm)
- 1
FUI BANIDO DE TODOS SERVIDORES SEM MOTIVO
in Ban appeals archive
Posted · Edited by Jonas^
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.