dener189

Members
  • Content Count

    43
  • Joined

  • Last visited

Community Reputation

3 Neutral

About dener189

  • Rank
    Rat

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Tô ciente do aclGroupAddObject, já criei a ACL "Transportador" , tudo tá funcionando normal, menos abrir as rotas
  2. tenho um script de minha autoria que faz oq vc precisa, é facil de modificar ele. Pode usar ele, portanto que não remova os créditos Espero ter ajudado! Server: --[[ ################################################ # # # Script Criado Por # # [D]ener189 # # # # # ################################################ --]] ------------------------------------------------------------------------------------------------------------------------------------------------------ local predefinedHandling = { [411] = { --ID do Veiculo ["engineAcceleration"] = 35, ["dragCoeff"] = 0, ["maxVelocity"] = 260, --310Km ["tractionMultiplier"] = 0.8, ["tractionLoss"] = 1.1, }, [562] = { --Handler Drift ["driveType"] = "rwd", ["engineAcceleration"] = 200, ["dragCoeff"] = 1.5, ["maxVelocity"] = 202, ["tractionMultiplier"] = 0.7, ["tractionLoss"] = 0.8, ["collisionDamageMultiplier"] = 0.4, ["engineInertia"] = -175, ["steeringLock"] = 75, ["numberOfGears"] = 4, ["suspensionForceLevel"] = 0.8, ["suspensionDamping"] = 0.8, ["suspensionUpperLimit"] = 0.33, ["suspensionFrontRearBias"] = 0.3, ["mass"] = 1800, ["turnMass"] = 3000, ["centerOfMass"] = { [1]=0, [2]=-0.2, [3]=-0.5 }, }, } for i,v in pairs (predefinedHandling) do if i then for handling, value in pairs (v) do if not setModelHandling (i, handling, value) then outputDebugString ("* Predefined handling '"..tostring(handling).."' for vehicle model '"..tostring(i).."' could not be set to '"..tostring(value).."'") end end end end for _,v in ipairs (getElementsByType("vehicle")) do if v and predefinedHandling[getElementModel(v)] then for k,vl in pairs (predefinedHandling[getElementModel(v)]) do setVehicleHandling (v, k, vl) end end end function resetHandling() for model in pairs (predefinedHandling) do if model then for k in pairs(getOriginalHandling(model)) do setModelHandling(model, k, nil) end end end for _,v in ipairs (getElementsByType("vehicle")) do if v then local model = getElementModel(v) if predefinedHandling[model] then for k,h in pairs(getOriginalHandling(model)) do setVehicleHandling(v, k, h) end end end end end addEventHandler("onResourceStop", resourceRoot, resetHandling) Meta: <meta> <info author="[D]ener189" name="Handler" version="1.0" description="Velocidade Modificada Hurley Roleplay" type="script" /> <script src="handler.Lua" type="server"/> </meta>
  3. sim if getElementData (source, "HurleyRoleplay>Encaminhamento") == "Transportador" then setElementData (source, "HurleyRoleplay>Encaminhamento", false) setElementData (source, "Emprego", "Transportador")
  4. Olá peguei esse script da net que é um emprego de entregador de malotes, configurei as rotas tudo certo e pá, mas quando vai dar o comando para abrir, simplesmente não abre Cliente: local TransportadorTarget local TransportadorBlip local function clickToThrow(btn, state) if btn == "lalt" and state == true then if not isElement (TransportadorTarget) then removeEventHandler ("onClientKey", root, clickToThrow) else local localPos = {getElementPosition (localPlayer)} local targetPos = {getElementPosition (TransportadorTarget)} if getDistanceBetweenPoints3D (localPos[1], localPos[2], localPos[3], targetPos[1], targetPos[2], targetPos[3]) < 10 then local Transportador = createObject (1550, localPos[1], localPos[2] - 0.1, localPos[3] + 0.7) moveObject (Transportador, 400, targetPos[1], targetPos[2], targetPos[3]) setTimer (destroyElement, 3000, 1, Transportador) setElementCollisionsEnabled (Transportador, false) localPos = nil targetPos = nil clearTransportadorMission() triggerServerEvent ("payMeWhatYouOweMe", localPlayer) end end end end addEvent ("requestTransportadorjobStart", true) local function startTransportadorjob (locationTable) local randomLocation = locationTable[math.random(#locationTable)] TransportadorTarget = createMarker (randomLocation[1], randomLocation[2], randomLocation[3], "cylinder", 4, 255, 50, 50, 100) TransportadorBlip = createBlipAttachedTo (TransportadorTarget, 31) addEventHandler ("onClientKey", root, clickToThrow) --outputChatBox ( "Você Pegou Transportador, Siga o Checkpoint para Entregar!"--[[..getZoneName(randomLocation[1], randomLocation[2], randomLocation[3])--]], 255, 50, 50, true) end addEventHandler ("requestTransportadorjobStart", localPlayer, startTransportadorjob) function clearTransportadorboyMission() if isElement (TransportadorTarget) then destroyElement (TransportadorTarget) end if isElement (TransportadorBlip) then destroyElement (TransportadorBlip) end removeEventHandler ("onClientKey", root, clickToThrow) end addEventHandler ("onClientPlayerWasted", localPlayer, clearTransportadorMission) function removeHelmetOnExit ( vehicle, seat, jacked ) if isElement (TransportadorTarget) then destroyElement (TransportadorTarget) end if isElement (TransportadorBlip) then destroyElement (TransportadorBlip) end removeEventHandler ("onClientKey", root, clickToThrow) end addEventHandler ( "onPlayerVehicleExit", getRootElement(), removeHelmetOnExit ) addEvent( "HurleyRoleplay:CancelarEmpregoTransportador", true ) addEventHandler( "HurleyRoleplay:CancelarEmpregoTransportador", localPlayer, removeHelmetOnExit ) Server: TransportadorPickup = createPickup ( 1088.438, 1913.967, 10.82, 3, 1210) MakerTransportador = createMarker ( 1088.438, 1913.967, 10.82, "cylinder", 1.2, 255, 255, 255, 0 ) attachElements ( MakerTransportador, TransportadorPickup, 0, 0, -1 ) MarkerSafeTransportador = createMarker ( 1080.761, 1919.251, 11.23, "cylinder", 20, 255, 255, 255, 0 ) function CancelarSumirPickup ( player ) cancelEvent() end addEventHandler ( "onPickupHit", TransportadorPickup, CancelarSumirPickup ) LetraParaMarkers = "k" cmd1 = "profissao" cmd2 = "transportar" cmd3 = "hq" local HQTransportadorBlip = createBlip ( 1088.438, 1913.967, 10.82 ) setElementVisibleTo ( HQTransportadorBlip, root, false ) ------------------------------------------------------------------------------------------------------------------------------------------------------ function VerificarBlipEmprego(player) if player then acc = getPlayerAccount ( player ) if isGuestAccount ( acc ) then return end setElementVisibleTo ( HQTransportadorBlip, player, false ) end end setTimer( function() for i, pl in pairs(getElementsByType("player")) do if pl ~= (false or nil) then if getElementData ( pl, "Emprego" ) == "Transportador" then return end VerificarBlipEmprego(pl) end end end, 3000,0) ------------------------------------------------------------------------------------------------------------------------------------------------------ function ComandoHQ ( source ) if getElementData ( source, "Emprego" ) == "Transportador" then if isElementVisibleTo ( HQTransportadorBlip, source ) then setElementVisibleTo ( HQTransportadorBlip, source, false ) exports.Scripts_Dxmessages:outputDx(source, "Seu Local de Trabalho foi Desmarcado do Mapa!", "info") else setElementVisibleTo ( HQTransportadorBlip, source, true ) exports.Scripts_Dxmessages:outputDx(source, "Seu Local de Trabalho foi Marcado no Mapa!", "info") end end end addCommandHandler ( cmd3, ComandoHQ ) ------------------------------------------------------------------------------------------------------------------------------------------------------ function AceitarEmprego07 (source) exports.Scripts_OnMarkerMsgs_:delete (source) unbindKey (source, LetraParaMarkers, "down", AceitarEmprego07) if getElementData (source, "HurleyRoleplay>Encaminhamento") == "Transportador" then setElementData (source, "HurleyRoleplay>Encaminhamento", false) setElementData (source, "Emprego", "Transportador") exports.Scripts_Dxmessages:outputDx (source, "Você Agora Trabalha de Transportador de Valores, Para Mais Informações Digite ( /Profissao )", "success") if not isObjectInACLGroup ("user."..getAccountName (getPlayerAccount (source)), aclGetGroup("Transportador")) then aclGroupAddObject (aclGetGroup("Transportador"), "user."..getAccountName (getPlayerAccount (source))) else exports.Scripts_Dxmessages:outputDx (source, "Você Precisa Estar Encaminhado da Agencia de Empregos para Trabalhar neste Local!", "error") end end end function RecusarEmprego07 (source) exports.Scripts_OnMarkerMsgs_:delete (source) unbindKey (source, LetraParaMarkers, "down", RecusarEmprego07) if isObjectInACLGroup ("user."..getAccountName (getPlayerAccount (source)), aclGetGroup("Transportador")) then aclGroupRemoveObject (aclGetGroup("Transportador"), "user."..getAccountName (getPlayerAccount (source))) if isElementVisibleTo (HQEntregadorDeJornalBlip, source) then setElementVisibleTo (HQEntregadorDeJornalBlip, source, false) end end removeElementData (source, "Emprego", "Transportador") if isObjectInACLGroup ("user."..getAccountName (getPlayerAccount (source)), aclGetGroup("Transportador")) then aclGroupRemoveObject (aclGetGroup("Transportador"), "user."..getAccountName (getPlayerAccount (source))) else exports.Scripts_Dxmessages:outputDx(source, "Você se demitiu do emprego de Transportador de Valores com sucesso!", "warning") end end ------------------------------------------------------------------------------------------------------------------------------------------------------ Spawn = createMarker(1082.66, 1913.823, 10.82 -1,"cylinder", 1.9, 0, 255, 0, 99) function getPlayerFromPartialName(name) local name = name and name:gsub("#%x%x%x%x%x%x", ""):lower() or nil if name then for _, player in ipairs(getElementsByType("player")) do local name_ = getPlayerName(player):gsub("#%x%x%x%x%x%x", ""):lower() if name_:find(name, 1, true) then return player end end end end veh = {} function spawnvtr ( thePlayer, comando, nick ) if veh[thePlayer] and isElement( veh[thePlayer] ) then destroyElement ( veh[thePlayer] ) veh[thePlayer] = nil end local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Transportador") ) then veh[thePlayer] = createVehicle(498, 1081.771, 1922.637, 11.205, -0, 0, 354.788) warpPedIntoVehicle ( thePlayer, veh[thePlayer] ) exports.Scripts_Dxmessages:outputDx(thePlayer, "Veiculo criado com sucesso", "success") else exports.Scripts_Dxmessages:outputDx(thePlayer, "Esse Veiculo é Exclusivo dos Transportador de Valores!", "warning") end end addEventHandler("onMarkerHit", Spawn, spawnvtr) ------------------------------------------------------------------------------------------------------------------------------------------------------ function emarker(marker,md) if (md) then if isPedInVehicle ( source ) then return end if marker == MakerTransportador then if getElementData ( source, "Emprego" ) == "Transportador" then exports.Scripts_OnMarkerMsgs_:create(source,"Aperte 'K' Para se Demitir do Emprego de Transportador de Valores") bindKey ( source, LetraParaMarkers, "down", RecusarEmprego07 ) else exports.Scripts_OnMarkerMsgs_:create(source,"Aperte 'K' Para Aceitar o Emprego de Transportador de Valores") bindKey ( source, LetraParaMarkers, "down", AceitarEmprego07 ) end end end end addEventHandler("onPlayerMarkerHit",getRootElement(),emarker) function lmarker(marker,md) if (md) then if marker == MakerTransportador then exports.Scripts_OnMarkerMsgs_:delete(source) unbindKey ( source, LetraParaMarkers, "down", AceitarEmprego07 ) unbindKey ( source, LetraParaMarkers, "down", RecusarEmprego07 ) end end end addEventHandler("onPlayerMarkerLeave",getRootElement(),lmarker) ------------------------------------------------------------------------------------------------------------------------------------------------------ function ComandosProf ( ThePlayer ) if getElementData ( ThePlayer, "Emprego" ) == "Transportador" then playSoundFrontEnd ( ThePlayer, 43 ) outputChatBox ( "#F9A631~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #F96031Profissão #F9A631~~~~~~~~~~~~~~~~~~~~~~~~~~~~", ThePlayer, 255, 255, 255, true ) outputChatBox ( "#F96031» #BEE09AComandos da Profissão de Transportador de Valores", ThePlayer, 255, 255, 255, true ) outputChatBox ( "#F96031» #55D444/HQ #ffffff- #9ABDE0Para Marcar / Desmarcar o seu Local de Trabalho", ThePlayer, 255, 255, 255, true ) outputChatBox ( "#F96031» #55D444/Transportar #ffffff- #9ABDE0Para Iniciar a Entrega dos Malotes", ThePlayer, 255, 255, 255, true ) outputChatBox ( "#F96031» #55D444ALT Esquerdo #ffffff- #9ABDE0Entrega o Malote no Marker da Entrega", ThePlayer, 255, 255, 255, true ) outputChatBox ( "#F96031» #FFD700Entre no Caminão de Valores, Digite /Transportar e Siga os Checkpoints!", ThePlayer, 255, 255, 255, true ) outputChatBox ( "#F9A631~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #F96031Profissão #F9A631~~~~~~~~~~~~~~~~~~~~~~~~~~~~", ThePlayer, 255, 255, 255, true ) end end addCommandHandler(cmd1, ComandosProf ) -- local moneyPerTransportador = 10000 local TransportadorSkins = { [71]=true; } local TransportadorVehicles = { [498]=true; } -- Note that location name must correspond to the area in San Andreas you'd like Job available in, for example: ["RC"] won't work, instead, put ["Red County"] local locations = { ["San Andreas"] = { { 2534.708, 1969.196, 11.224 -1}; { 2189.125, 2459.45, 11.127 -1}; { 2106.925, 901.697, 11.232 -1}; { -5.474, 1193.666, 19.211 -1}; { -823.825, 1496.641, 19.253 -1}; { -1534.713, 2605.708, 55.686 -1}; { -2491.248, 2335.734, 4.836 -1}; { -2359.108, 1003.349, 50.703 -1}; { -2011.403, 443.272, 35.016 -1}; { -2599.528, 25.445, 4.18 -1}; { -1803.874, -127.844, 5.58 -1}; { 228.301, -187.859, 1.43 -1}; { 658.364, -576.345, 16.336 -1}; { 1383.188, 264.063, 19.57 -1}; { 2365.264, 86.898, 26.341 -1}; { 1052.542, -1136.714, 23.656 -1}; { 767.607, -1324.25, 13.391 -1}; { 1822.777, -1560.236, 13.367 -1}; { 1932.181, -1769.308, 13.383 -1}; }; } local function initializeOnVehicleEnter (p, s) --if p and s == 0 and pizzaSkins[getElementModel(p)] and pizzaVehicles[getElementModel(source)] then if getElementData ( p, "Emprego" ) == "Transportador" then if isElementWithinMarker( p, MarkerSafeTransportador) then local sourcePos = {getElementPosition(p)} local playerZone = getZoneName (sourcePos[1], sourcePos[2], sourcePos[3], true) if locations[playerZone] then triggerClientEvent (p, "requestTransportadorjobStart", p, locations[playerZone]) exports.Scripts_Dxmessages:outputDx( p, "Você Pegou os Malotes, Siga o Checkpoint para Entregar!", "info") --outputChatBox ("* PIZZA * Dica:#FFFFFF Utilize o Botão esquerdo do Mouse para Entregar a Pizza!", p, 255, 50, 50, true) end sourcePos = nil playerZone = nil end end end --addEventHandler ("onVehicleEnter", root, initializeOnVehicleEnter) addCommandHandler (cmd2, initializeOnVehicleEnter) addEvent ("payMeWhatYouOweMe", true) local function payMeWhatYouOweMe() givePlayerMoney (client, moneyPerTransportador) exports.Scripts_Dxmessages:outputDx(client, "Você recebeu $"..moneyPerTransportador.." Por Entregar um Malote, Siga Para a Proxima Entrega!", "success") setTimer (function(client) if not client then return end local sourcePos = {getElementPosition(client)} local playerZone = getZoneName (sourcePos[1], sourcePos[2], sourcePos[3], true) triggerClientEvent (client, "requestTransportadorjobStart", client, locations[playerZone]) sourcePos = nil playerZone = nil end, 1500, 1, client) end addEventHandler ("payMeWhatYouOweMe", root, payMeWhatYouOweMe) function removeHelmetOnExit ( thePlayer, seat, jacked ) triggerClientEvent ( "HurleyRoleplay:CancelarEmpregoTransportador", thePlayer ) end addEventHandler ( "onVehicleExit", getRootElement(), removeHelmetOnExit ) ------------------------------------------------------------------------------------------------------------------------------------------------------
  5. Oq tem de tem de errado? [2019-09-04 12:39:03] ERROR: s_anticheat.Lua:21: exports: Call to non-running server resource (pool) [string "?"] [2019-09-04 12:39:03] ERROR: s_anticheat.Lua:22: bad argument #1 to 'ipairs' (table expected, got nil) function showSpeedToAdmins(velocity) kph = math.ceil(velocity * 1.609344) exports.global:sendMessageToAdmins("[Possible Speedhack/HandlingHack] " .. getPlayerName(client) .. ": " .. velocity .. "Mph/".. kph .." Kph") end addEvent("alertAdminsOfSpeedHacks", true) addEventHandler("alertAdminsOfSpeedHacks", getRootElement(), showSpeedToAdmins) function showDMToAdmins(kills) exports.global:sendMessageToAdmins("[Possible DeathMatching] " .. getPlayerName(client) .. ": " .. kills .. " kills in <=2 Minutes.") end addEvent("alertAdminsOfDM", true) addEventHandler("alertAdminsOfDM", getRootElement(), showDMToAdmins) -- [MONEY HACKS] function scanMoneyHacks() local tick = getTickCount() local hackers = { } local hackersMoney = { } local counter = 0 local players = exports.pool:getPoolElementsByType("player") for key, value in ipairs(players) do local logged = getElementData(value, "loggedin") if (logged==1) then if not (exports.integration:isPlayerTrialAdmin(value)) then -- Only check if its not an admin... local money = getPlayerMoney(value) local truemoney = exports.global:getMoney(value) if (money) then if (money > truemoney) then counter = counter + 1 hackers[counter] = value hackersMoney[counter] = (money-truemoney) end end end end end local tickend = getTickCount() local theConsole = getRootElement() for key, value in ipairs(hackers) do local money = hackersMoney[key] local accountID = getElementData(value, "account:id") local adminTitle = exports.global:getPlayerAdminTitle(thePlayer) outputChatBox("AntiCheat: " .. targetPlayerName .. " was auto-banned for Money Hacks. (" .. tostring(money) .. "$)", getRootElement(), 255, 0, 51) end end setTimer(scanMoneyHacks, 3600000, 0) -- Every 60 minutes
  6. I'm a professional Mapper, contact me at discord dener189$3280
  7. Desculpe por apenas copiar e colar, estava com pressa e apenas queria ver se assim seria eficaz. Essas linhas estão perfeitas, funcionou certinho ❤️
  8. Oque fiz de errado? KKKKKKKK Server: function AceitarEmprego02 (source) exports.Scripts_OnMarkerMsgs_:delete(source) unbindKey ( source, LetraParaMarkers, "down", AceitarEmprego02 ) if getElementData ( source, "AirNew>Encaminhamento" ) == "Entregador de Jornal" then setElementData ( source, "AirNew>Encaminhamento", false ) setElementData ( source, "Emprego", "Entregador de Jornal" ) exports.Scripts_Dxmessages:outputDx(source, "Você Agora Trabalha de Entregador de Jornal, Para Mais Informações Digite ( /Profissao )", "success") triggerServerEvent ("onRequestPegarEmprego", localPlayer, "pegarEmprego") else exports.Scripts_Dxmessages:outputDx(source, "Você Precisa Estar Encaminhado da Agencia de Empregos para Trabalhar neste Local!", "error") end end function confirmTrampo (type, join, leave) if (type == "pegarEmprego") then -- Se a string enviada pelo client for "pegarEmprego", então: if (isObjectInACLGroup ("user."..getAccountName (getPlayerAccount (client)), aclGetGroup("Entregador"))) then -- Se o jogador já estiver na acl "Mecanico", então: else -- Senão: aclGroupAddObject (aclGetGroup("Entregador"), "user."..getAccountName (getPlayerAccount (client))) -- Coloca o jogador na acl "Mecanico". end end end addEvent ("onRequestPegarEmprego", true) addEventHandler ("onRequestPegarEmprego", root, confirmTrampo) function RecusarEmprego02 (source) exports.Scripts_OnMarkerMsgs_:delete(source) unbindKey ( source, LetraParaMarkers, "down", RecusarEmprego02 ) if isElementVisibleTo ( HQEntregadorDeJornalBlip, source ) then setElementVisibleTo ( HQEntregadorDeJornalBlip, source, false ) end removeElementData ( source, "Emprego", "Entregador de Jornal" ) triggerServerEvent ("onRequestSairEmprego", localPlayer, "sairEmprego") exports.Scripts_Dxmessages:outputDx(source, "Você se Demitiu do Emprego de Entregador de Jornal com Sucesso!", "warning") end function sairTrampo (type, join, leave) if (type == "sairEmprego") then -- Se a string enviada pelo client for "sairEmprego", então: if (isObjectInACLGroup ("user."..getAccountName (getPlayerAccount (client)), aclGetGroup("Entregador"))) then -- Se o jogador estiver na acl "Mecanico", então: aclGroupRemoveObject (aclGetGroup("Entregador"), "user."..getAccountName (getPlayerAccount (client))) -- Remove o jogador da acl "Mecanico". else end end end addEvent ("onRequestSairEmprego", true) addEventHandler ("onRequestSairEmprego", root, sairTrampo)
  9. Olá pessoal da comunidade PT/BR do MTA, estou com uma duvida. Tenho um script de entregador de jornais, queria saber se consigo fazer que o player entre em um grupo da ACL "Entregador de Jornal" quando ele acabar de ingressar na profissão e ele for removido ao pedir demissão? Client --[[ ################################################ # # # Script Criado Por # # FACEBOOK.COM/AIRNEWSCR # # # # # ################################################ --]] -------------------------------------------------------------------- local screenW,screenH = guiGetScreenSize() local resW, resH = 1366,768 local x, y = (screenW/resW), (screenH/resH) -------------------------------------------------------------------- function Window(rnames) if isElement(myWindow) then return end local screenW, screenH = guiGetScreenSize() myWindow = guiCreateWindow((screenW - x*485) / 2, (screenH - y*404) / 2, x*485, y*404, "Rotas", false) rotas = guiCreateGridList(x*40, y*40, x*405, y*275, false, myWindow) guiWindowSetSizable(myWindow, false) guiSetAlpha(rotas, x*0.70) guiGridListAddColumn( rotas, "Rotas", x*0.85 ) for k,v in pairs(rnames) do row = guiGridListAddRow ( rotas ) guiGridListSetItemText ( rotas, row, 1, tostring(k), false, false ) end showCursor(true) fechar = guiCreateButton(x*275, y*334, x*168, y*35, "Fechar", false, myWindow) escolher = guiCreateButton(x*42, y*334, x*168, y*35, "Carregar", false, myWindow) end addEvent("AirNew>JOBEntregadorDeJornal>AbrirPainel<Client", true) addEventHandler("AirNew>JOBEntregadorDeJornal>AbrirPainel<Client", localPlayer, Window) function botoes(bt,state) if state == "up" and bt == "left" then if source == fechar then if isElement(myWindow) then destroyElement(myWindow) showCursor(false) end end if source == escolher then local selectedItemx = guiGridListGetSelectedItem(rotas) local nome = guiGridListGetItemText(rotas, selectedItemx, 1) if nome == nil then outputChatBox("#00FF73[HR] #ffffffSelecione Uma Rota",255,255,255,true) return end triggerServerEvent("AirNew>request>Startrota>Server>EntregadorDeJornal",localPlayer,localPlayer,nome) if isElement(myWindow) then destroyElement(myWindow) showCursor(false) end end end end addEventHandler("onClientGUIClick", root,botoes) function blips(state,x,y,z) if state == true then if not isElement(blips) then blips = createBlip ( x, y, z, 0) end else if isElement(blips) then destroyElement(blips) end end end addEvent("AirNew>JOBEntregadorDeJornal>blips<Client", true) addEventHandler("AirNew>JOBEntregadorDeJornal>blips<Client", localPlayer, blips) function DesligarAntiQuedaBike () setPedCanBeKnockedOffBike ( localPlayer, true ) end addEvent( "Desligar:AntiQueda", true ) addEventHandler( "Desligar:AntiQueda", localPlayer, DesligarAntiQuedaBike ) function LigarAntiQuedaBike () setPedCanBeKnockedOffBike ( localPlayer, false ) end addEvent( "Ligar:AntiQueda", true ) addEventHandler( "Ligar:AntiQueda", localPlayer, LigarAntiQuedaBike ) Server MarkerSafeEntregadorDeJornal = createMarker( 765.68848, -1355.44495, 13.52570, "cylinder", 35, 0, 255, 0, 0) EntregadorDeJornalPickup = createPickup ( 783.27710, -1327.66260, 13.54688, 3, 1210) MarkerEntregadorDeJornal = createMarker ( 783.27710, -1327.66260, 13.54688, "cylinder", 1.2, 255, 255, 255, 0 ) attachElements ( MarkerEntregadorDeJornal, EntregadorDeJornalPickup, 0, 0, -1 ) function CancelarSumirPickup ( player ) cancelEvent() end addEventHandler ( "onPickupHit", EntregadorDeJornalPickup, CancelarSumirPickup ) LetraParaMarkers = "k" cmd1 = "hq" cmd2 = "profissao" local HQEntregadorDeJornalBlip = createBlip ( 783.27710, -1327.66260, 13.54688 ) setElementVisibleTo ( HQEntregadorDeJornalBlip, root, false ) -------------------------------------------------------------------- function VerificarBlipEmprego(player) if player then acc = getPlayerAccount ( player ) if isGuestAccount ( acc ) then return end setElementVisibleTo ( HQEntregadorDeJornalBlip, player, false ) end end setTimer( function() for i, pl in pairs(getElementsByType("player")) do if pl ~= (false or nil) then if getElementData ( pl, "Emprego" ) == "Entregador de Jornal" then return end VerificarBlipEmprego(pl) end end end, 3000,0) -------------------------------------------------------------------- function ComandoHQ ( source ) if getElementData ( source, "Emprego" ) == "Entregador de Jornal" then if isElementVisibleTo ( HQEntregadorDeJornalBlip, source ) then setElementVisibleTo ( HQEntregadorDeJornalBlip, source, false ) exports.Scripts_Dxmessages:outputDx(source, "Seu Local de Trabalho foi Desmarcado do Mapa!", "info") else setElementVisibleTo ( HQEntregadorDeJornalBlip, source, true ) exports.Scripts_Dxmessages:outputDx(source, "Seu Local de Trabalho foi Marcado no Mapa!", "info") end end end addCommandHandler ( cmd1, ComandoHQ ) -------------------------------------------------------------------- function AceitarEmprego02 (source) exports.Scripts_OnMarkerMsgs_:delete(source) unbindKey ( source, LetraParaMarkers, "down", AceitarEmprego02 ) if getElementData ( source, "AirNew>Encaminhamento" ) == "Entregador de Jornal" then setElementData ( source, "AirNew>Encaminhamento", false ) setElementData ( source, "Emprego", "Entregador de Jornal" ) exports.Scripts_Dxmessages:outputDx(source, "Você Agora Trabalha de Entregador de Jornal, Para Mais Informações Digite ( /Profissao )", "success") else exports.Scripts_Dxmessages:outputDx(source, "Você Precisa Estar Encaminhado da Agencia de Empregos para Trabalhar neste Local!", "error") end end function RecusarEmprego02 (source) exports.Scripts_OnMarkerMsgs_:delete(source) unbindKey ( source, LetraParaMarkers, "down", RecusarEmprego02 ) if isElementVisibleTo ( HQEntregadorDeJornalBlip, source ) then setElementVisibleTo ( HQEntregadorDeJornalBlip, source, false ) end removeElementData ( source, "Emprego", "Entregador de Jornal" ) exports.Scripts_Dxmessages:outputDx(source, "Você se Demitiu do Emprego de Entregador de Jornal com Sucesso!", "warning") end -------------------------------------------------------------------- function ComandosProf ( ThePlayer ) if getElementData ( ThePlayer, "Emprego" ) == "Entregador de Jornal" then playSoundFrontEnd ( ThePlayer, 43 ) outputChatBox ( "#F9A631~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #F96031Profissão #F9A631~~~~~~~~~~~~~~~~~~~~~~~~~~~~", ThePlayer, 255, 255, 255, true ) outputChatBox ( "#F96031» #BEE09AComandos da Profissão de Entregador de Jornal", ThePlayer, 255, 255, 255, true ) outputChatBox ( "#F96031» #55D444/HQ #ffffff- #9ABDE0Para Marcar / Desmarcar o seu Local de Trabalho", ThePlayer, 255, 255, 255, true ) outputChatBox ( "#F96031» #55D444/Rotas #ffffff- #9ABDE0Abre a Lista de Rotas Disponiveis Para Trabalhar", ThePlayer, 255, 255, 255, true ) outputChatBox ( "#F96031» #FFD700Entre na Lambreta e Digite /Rotas Selecione uma Rota e Siga os Checkpoints!", ThePlayer, 255, 255, 255, true ) outputChatBox ( "#F9A631~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #F96031Profissão #F9A631~~~~~~~~~~~~~~~~~~~~~~~~~~~~", ThePlayer, 255, 255, 255, true ) end end addCommandHandler(cmd2, ComandosProf ) -------------------------------------------------------------------- function emarker(marker,md) if (md) then if isPedInVehicle ( source ) then return end if marker == MarkerEntregadorDeJornal then if getElementData ( source, "Emprego" ) == "Entregador de Jornal" then exports.Scripts_OnMarkerMsgs_:create(source,"Aperte 'K' Para se Demitir do Emprego de Entregador de Jornal") bindKey ( source, LetraParaMarkers, "down", RecusarEmprego02 ) else exports.Scripts_OnMarkerMsgs_:create(source,"Aperte 'K' Para Aceitar o Emprego de Entregador de Jornal") bindKey ( source, LetraParaMarkers, "down", AceitarEmprego02 ) end end end end addEventHandler("onPlayerMarkerHit",getRootElement(),emarker) function lmarker(marker,md) if (md) then if marker == MarkerEntregadorDeJornal then exports.Scripts_OnMarkerMsgs_:delete(source) unbindKey ( source, LetraParaMarkers, "down", AceitarEmprego02 ) unbindKey ( source, LetraParaMarkers, "down", RecusarEmprego02 ) end end end addEventHandler("onPlayerMarkerLeave",getRootElement(),lmarker) function CriarVeiculosComData () VeiculosComDataEntregadorDeJornal = { createVehicle(462, 785.55151, -1332.39575 -0, 13.54213, 0, 0, 90 ), createVehicle(462, 785.55151, -1332.39575 -2, 13.54213, 0, 0, 90 ), createVehicle(462, 785.55151, -1332.39575 -4, 13.54213, 0, 0, 90 ), createVehicle(462, 785.55151, -1332.39575 -6, 13.54213, 0, 0, 90 ), createVehicle(462, 785.55151, -1332.39575 -8, 13.54213, 0, 0, 90 ), createVehicle(462, 785.55151, -1332.39575 -10, 13.54213, 0, 0, 90 ), createVehicle(462, 785.55151, -1332.39575 -12, 13.54213, 0, 0, 90 ), createVehicle(462, 785.55151, -1332.39575 -14, 13.54213, 0, 0, 90 ), createVehicle(462, 785.55151, -1332.39575 -16, 13.54213, 0, 0, 90 ), createVehicle(462, 785.55151, -1332.39575 -18, 13.54213, 0, 0, 90 ), } for i, veh in ipairs(VeiculosComDataEntregadorDeJornal) do setElementData ( veh, "Emprego", "Entregador de Jornal" ) setVehicleDamageProof(veh,true) setVehicleColor( veh, 0, 0, 0 ) setVehiclePlateText ( veh, "RPGAMING" ) addEventHandler("onVehicleStartEnter", veh, VerificarEmprego ) --addEventHandler("onVehicleExit", veh, SairDoVeiculosComData ) local tx, ty, tz = getElementPosition(veh) local rx, ry, rz = getElementRotation(veh) setVehicleRespawnPosition(veh, tx, ty, tz, rx, ry, rz) end end addEventHandler("onResourceStart", resourceRoot, CriarVeiculosComData ) function VerificarEmprego (thePlayer, seat) local Jogador = getElementData(thePlayer, "Emprego" ) if seat == 0 then if Jogador == "Entregador de Jornal" then else cancelEvent() exports.Scripts_Dxmessages:outputDx(thePlayer, "Esse Veiculo é Exclusivo dos Entregadores de Jornal!", "error") end end end --[[function SairDoVeiculosComData () local veh = source setTimer(function() if getVehicleOccupant(veh) == false then respawnVehicle(veh) end end, 30000, 1) end addEventHandler ( "onPlayerQuit", getRootElement(), SairDoVeiculosComData ) --]] -------------------------------------------------------------------- local rElement = getRootElement() function respawnVehicles(player, seconds) for i, veh in ipairs(VeiculosComDataEntregadorDeJornal) do if isEmpty( veh ) then respawnVehicle ( veh ) end end end setTimer(respawnVehicles, 10000,0) function isEmpty( vehicle ) local passengers = getVehicleMaxPassengers( vehicle ) if type( passengers ) == 'number' then for seat = 0, passengers do if getVehicleOccupant( vehicle, seat ) then return false end end end return true end -------------------------------------------------------------------- atualrotnumberJORNAL = {} ppcikJORNAL = {} blips = {} rotasJORNAL = { ["Entregas de Jornais - Los Santos (1) - 20 Entregas - $670"] = { {993.64386, -1050.08850, 30.72189}, {1051.22083, -1049.50073, 31.70257}, {1117.78308, -1030.55933, 31.88287}, {1190.73914, -1027.36011, 32.35918}, {1466.25684, -1172.65686, 23.88302}, {1673.56787, -1169.50952, 23.92861}, {1791.41406, -1164.77539, 23.82813}, {2095.31763, -1292.43701, 23.97214}, {2150.26270, -1291.66003, 23.97753}, {2352.69019, -1513.26306, 24.00000}, {2561.87158, -1467.34753, 24.01236}, {2756.12573, -1180.33130, 69.39844}, {2863.57446, -1440.18982, 10.95315}, {2507.24414, -1725.65881, 13.54688}, {2390.33276, -1721.86511, 13.58705}, {2228.38867, -1722.77356, 13.55438}, {2175, -1742, 13.55438}, {2072.61230, -1793.96008, 13.54688}, {1871.15784, -1923.91858, 13.54688}, {1352.39136, -1758.33508, 13.50781}, }, ["Entregas de Jornais - Los Santos (2) - 20 Entregas - $750"] = { {823.93018, -1413.86011, 13.46503}, {909.32098, -1504.01135, 13.54223}, {797.72333, -1580.37390, 13.54688}, {645.75140, -1694.06555, 14.89330}, {422.36475, -1758.63403, 8.18526}, {305.55188, -1771.70020, 4.54249}, {168.62589, -1770.10681, 4.43438}, {138.38370, -1460.07129, 25.62103}, {169.82892, -1348.34363, 69.36220}, {280.87973, -1320.37817, 53.81308}, {543.01135, -1202.30334, 44.50127}, {562.19452, -1060.57458, 74.59800}, {782.98035, -808.70764, 65.19865}, {908.08984, -684.05566, 116.23006}, {1091.30396, -627.89929, 111.38203}, {1280.77197, -614.80652, 102.93521}, {1437.30725, -935.30865, 36.26117}, {1335.64368, -1066.11133, 27.87136}, {1144.98792, -1131.54431, 23.82813}, {1022.52026, -1122.13037, 23.87152}, }, } pay = { ["Entregas de Jornais - Los Santos (1) - 20 Entregas - $670"] = 670, ["Entregas de Jornais - Los Santos (2) - 20 Entregas - $750"] = 750, } function ifPlayerEnterOnMarker(markerHit,matchingDimension) if isPedInVehicle(source) then if markerHit == ppcikJORNAL[source] then if (matchingDimension) then if isElement(ppcikJORNAL[source]) then local rname = getElementData(source,"rtnameJornal") or nil if rname == nil then return end destroyElement(ppcikJORNAL[source]) triggerClientEvent(source,"AirNew>JOBEntregadorDeJornal>blips<Client",source,false) local vh = getPedOccupiedVehicle(source) toggleAllControls ( source, false ) setControlState ( source, "handbrake", true ) if atualrotnumberJORNAL[source] <= #rotasJORNAL[rname] then exports.Scripts_Dxmessages:outputDx(source, "Entregando Jornais... Aguarde 2 Segundos!", "info") setTimer(gerarrota,2500,1,source) setTimer(function(source) exports.Scripts_Dxmessages:outputDx(source, "Jornais Entregues, Siga Para o Proximo Checkpoint!", "success") end,2500,1,source) elseif atualrotnumberJORNAL[source] == #rotasJORNAL[rname]+1 then setElementData(source,"rtnameJornal",rname) atualrotnumberJORNAL[source] = 1 local rec = pay[rname] givePlayerMoney(source,tonumber(rec)) local vh = getPedOccupiedVehicle(source) setTimer(function(source) exports.Scripts_Dxmessages:outputDx(source, "Você Recebeu um Valor de $"..rec.." Por Finalizar as Entregas de Jornais!", "success") end,2500,1,source) setTimer(function(source) toggleAllControls ( source, true ) end, 2500,1, source ) setTimer(function(source) setControlState ( source, "handbrake", false ) end, 2500,1, source ) setElementData(source,"rtnameJornal",nil) end end end end end end addEventHandler("onPlayerMarkerHit",getRootElement(),ifPlayerEnterOnMarker) -------------------------------------------------------------------- function VerificarCairBike(player) if player then acc = getPlayerAccount ( player ) if isGuestAccount ( acc ) then return end local rname = getElementData(player,"rtnameJornal") or nil if rname == nil then triggerClientEvent ( "Desligar:AntiQueda", player ) else triggerClientEvent ( "Ligar:AntiQueda", player ) end end end setTimer( function() for i, pl in pairs(getElementsByType("player")) do if pl ~= (false or nil) then if getElementData ( pl, "Emprego" ) == "Entregador de Jornal" then VerificarCairBike(pl) end end end end, 3000,0) -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- function pickjobJornal(source) if not isElement(source) then return end local im = isPedInVehicle(source) if im == false then return end local job = getElementData(source,"Emprego") or false if job == "Entregador de Jornal" then local vh = getPedOccupiedVehicle(source) if isElement(vh) then local x,y = getElementPosition(vh) local x1,y1 = getElementPosition(source) local dist = getDistanceBetweenPoints2D(x,y,x1,y1) local isMarkerSafe = isElementWithinMarker(vh,MarkerSafeEntregadorDeJornal) local id = getElementModel(vh) local seat = getPedOccupiedVehicleSeat(source) if dist > 0 then return end if id == 462 then if seat == 0 then if isMarkerSafe == false then return end triggerClientEvent(source,"AirNew>JOBEntregadorDeJornal>AbrirPainel<Client",source,rotasJORNAL) end end end end end addCommandHandler("rotas",pickjobJornal) function receivert(source,rotaname) if isElement(ppcikJORNAL[source]) then destroyElement(ppcikJORNAL[source]) end triggerClientEvent(source,"AirNew>JOBEntregadorDeJornal>blips<Client",source,false) setElementData(source,"rtnameJornal",rotaname) atualrotnumberJORNAL[source] = 1 gerarrota(source) end addEvent("AirNew>request>Startrota>Server>EntregadorDeJornal", true) addEventHandler("AirNew>request>Startrota>Server>EntregadorDeJornal",getRootElement(), receivert) function gerarrota(source) local rname = getElementData(source,"rtnameJornal") or nil if rname == nil then return end if not isElement(ppcikJORNAL[source]) and isPedInVehicle(source) then local vh = getPedOccupiedVehicle(source) toggleAllControls ( source, true ) setControlState ( source, "handbrake", false ) local id = tonumber(atualrotnumberJORNAL[source]) local x,y,z = rotasJORNAL[rname][id][1],rotasJORNAL[rname][id][2],rotasJORNAL[rname][id][3] ppcikJORNAL[source] = createMarker (x, y,z, "checkpoint", 4, 255, 0, 0, 50,source) triggerClientEvent(source,"AirNew>JOBEntregadorDeJornal>blips<Client",source,true,x,y,z) atualrotnumberJORNAL[source] = id+1 end end function sair ( quitType ) if isElement(ppcikJORNAL[source]) then destroyElement(ppcikJORNAL[source]) end end addEventHandler ( "onPlayerQuit", getRootElement(), sair ) function SairDaBike ( thePlayer, seat, jacked ) local rname = getElementData(thePlayer,"rtnameJornal") or nil if rname == nil then return end canceljobtimer (thePlayer) exports.Scripts_Dxmessages:outputDx(thePlayer, "Você saiu da Lambreta, e suas entregas foram canceladas!", "warning") end addEventHandler ( "onVehicleExit", getRootElement(), SairDaBike ) function canceljobtimer(source) if isElement(ppcikJORNAL[source]) then destroyElement(ppcikJORNAL[source]) end triggerClientEvent(source,"AirNew>JOBEntregadorDeJornal>blips<Client",source,false) atualrotnumberJORNAL[source] = 1 setElementData(source,"rtnameJornal",nil) end function canceljobdeath() local job = getElementData(source,"Emprego") or false if job ~= "Entregador de Jornal" then return end local rname = getElementData(source,"rtnameJornal") or nil if rname == nil then return end canceljobtimer(source) exports.Scripts_Dxmessages:outputDx(source, "Você Morreu e Suas Entregas Foram Canceladas!", "warning") end addEventHandler( "onPlayerWasted", getRootElement( ),canceljobdeath)
  10. O B R I G A D O !!!!! Funcionou. Apenas mudei as linhas para "--setPlayerHudComponentVisible("all", true)" e já era
  11. Ok, vou ver se acho qual o script que tá causando isso. Foi mal por ter postado em inglês, ia postar aqui em PT/BR C:\Users\dener\OneDrive\Área de Trabalho\Hurley Roleplay\mods\deathmatch\resources\[mapas]\[MAPA]Mec\sourceC.Lua (2 hits) Line 1192: --setPlayerHudComponentVisible("all", false) Line 1203: --setPlayerHudComponentVisible("all", true) C:\Users\dener\OneDrive\Área de Trabalho\Hurley Roleplay\mods\deathmatch\resources\[scripts]\ Hud\AirNewSCR_c.Lua (2 hits) Line 208: setPlayerHudComponentVisible(hudComponents, false) Line 216: setPlayerHudComponentVisible(hudComponents, true) C:\Users\dener\OneDrive\Área de Trabalho\Hurley Roleplay\mods\deathmatch\resources\[scripts]\ Login\Lua\function.Lua (2 hits) Line 72: setPlayerHudComponentVisible("all", false) Line 80: setPlayerHudComponentVisible("all", true) C:\Users\dener\OneDrive\Área de Trabalho\Hurley Roleplay\mods\deathmatch\resources\[scripts]\ MiraSniper\client.Lua (3 hits) Line 23: setPlayerHudComponentVisible ("crosshair", false); Line 52: setPlayerHudComponentVisible ("crosshair", true); Line 62: setPlayerHudComponentVisible ("crosshair", true); C:\Users\dener\OneDrive\Área de Trabalho\Hurley Roleplay\mods\deathmatch\resources\[scripts]\ PainelVIP\AirNew_c.Lua (2 hits) Line 291: setPlayerHudComponentVisible ( v, false ) Line 300: setPlayerHudComponentVisible ( v, true ) C:\Users\dener\OneDrive\Área de Trabalho\Hurley Roleplay\mods\deathmatch\resources\[scripts]\ Radar\client\main.Lua (2 hits) Line 20: setPlayerHudComponentVisible("radar",false) Line 26: setPlayerHudComponentVisible("radar",true) C:\Users\dener\OneDrive\Área de Trabalho\Hurley Roleplay\mods\deathmatch\resources\[scripts]\ Removedor\client.Lua (2 hits) Line 19: setPlayerHudComponentVisible(hudComponents, false) Line 27: setPlayerHudComponentVisible(hudComponents, true) C:\Users\dener\OneDrive\Área de Trabalho\Hurley Roleplay\mods\deathmatch\resources\[scripts]\ Velocimetro\client.Lua (16 hits) Line 303: setPlayerHudComponentVisible ( "ammo", false ) Line 304: setPlayerHudComponentVisible ( "armour", false ) Line 305: setPlayerHudComponentVisible ( "breath", false ) Line 306: setPlayerHudComponentVisible ( "clock", false ) Line 307: setPlayerHudComponentVisible ( "health", false ) Line 308: setPlayerHudComponentVisible ( "money", false ) Line 309: setPlayerHudComponentVisible ( "weapon", false ) Line 310: setPlayerHudComponentVisible ( "wanted", false ) Line 318: setPlayerHudComponentVisible ( "ammo", true ) Line 319: setPlayerHudComponentVisible ( "armour", true ) Line 320: setPlayerHudComponentVisible ( "breath", true ) Line 321: setPlayerHudComponentVisible ( "clock", true ) Line 322: setPlayerHudComponentVisible ( "health", true ) Line 323: setPlayerHudComponentVisible ( "money", true ) Line 324: setPlayerHudComponentVisible ( "weapon", true ) Line 325: setPlayerHudComponentVisible ( "wanted", true ) C:\Users\dener\OneDrive\Área de Trabalho\Hurley Roleplay\mods\deathmatch\resources\[scripts]\ Velocimetro\config.Lua (1 hit) Line 1: setPlayerHudComponentVisible ( "vehicle_name", false ) Deu Esse Resultado
  12. Hello MTA community, I have a server on faze BETA and I have this problem. The original GTA SA Hud comes back, a "Solution" I had was to use a function that restarted the script every 5 seconds, is a good "Solution" because it does not return the original hud but is not yet effective. Watch the video and know what I'm talking about
  13. Olá comunidade PT/BR do MTA, tenho um servidor em faze BETA e estou com esse problema. O Hud original do GTA SA volta, uma "Solução" que tive foi usar uma função que reiniciava o script a cada 5 segundos, é uma "Solução" boa pois não volta o hud original, mas mesmo assim não é eficaz. Vejam o vídeo e saberão oque to falando https://youtu.be/zblY47fgsUo
  14. Achei oq estava interferindo nos demais scripts. O radar do mapa quem fazia os painéis sumirem