All Activity

This stream auto-updates     

  1. Past hour
  2. bom ta tendo uma quantidade enorme de erro no meu serve como esses e todos eles são esse mesmo erro envolvendo 'getPlayerAccount 'getAccountName' não sei se e a falta de um banco de dados se alguem puder me ajudar WARNING: [CORPS]/[BOPE]/[BOPE]Map2/gatescript.Lua:5: Bad argument @ 'getPlayerAccount' [Expected player or console at argument 1, got vehicle] WARNING: [CORPS]/[BOPE]/[BOPE]Map2/gatescript.Lua:5: Bad argument @ 'getAccountName' [Expected account at argument 1, got boolean] ERROR: [CORPS]/[BOPE]/[BOPE]Map2/gatescript.Lua:5: attempt to concatenate a boolean value local gate = createObject(980, 1810.9000244141, -1891.1999511719, 15.39999961853, 0, 0, 90) local marker = createMarker(1810.9000244141, -1891.1999511719, 9.6000003814697, "cylinder", 8, 0, 0, 0, 0) function moveGate(thePlayer) if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(thePlayer)) , aclGetGroup("BOPE")) then moveObject(gate, 3000, 1810.9000244141, -1891.1999511719, 9.6000003814697) end end addEventHandler("onMarkerHit", marker, moveGate) function move_back_gate() moveObject(gate, 3000, 1810.9000244141, -1891.1999511719, 15.39999961853) end addEventHandler("onMarkerLeave", marker, move_back_gate)
  3. use tables or setAccountData + getAccountData with getTimerDetails
  4. Hello. I would like to know how to save the mute of a player who reconnects Words = { ["test"] = true, ["mother"] = true, ["mom"] = true, } addEventHandler("onPlayerChat", getRootElement(), function(msg, msgType) local theMsg = msg if Words[theMsg] then cancelEvent() pName = getPlayerName(source) outputChatBox("#FF0000".. pName .." #FF0000 have been muted by Console.",getRootElement(),255,0,0,true) setPlayerMuted(source, true) setTimer (function ( player ) setPlayerMuted (player, false ) outputChatBox("#FF0000".. pName .." #ff0000 have been unmuted by Console.",getRootElement(),255,0,0,true) end, 300000,1, source ) end end )
  5. Today
  6. ola eu gostaria de saber como faço para mudar o id dos players,não sei mexer com scripts,o meu script de id é esse: function Start_Id ( _, acc ) if eventName == "onPlayerLogin" then setElementData ( source, "ID", getAccountID(acc) or "N/A" ) outputChatBox ( "#00ff00✘ #ffffffLOGIN #00ff00✘➺ #ffffffNick: #00ff00 ( ".. getPlayerName(source) .." #00ff00) #ffffffID: #00ff00( "..(getAccountID(acc) or "N/A") .." )", root, 255,255,255,true) elseif eventName == "onPlayerLogout" then removeElementData( source, "ID" ) outputChatBox ( "#00ff00✘ #ffffffLOGIN #00ff00✘➺ #ffffffNick: #00ff00 ( ".. getPlayerName(source) .." #00ff00) #ffffffDeslogou.", root, 255,255,255,true) elseif eventName == "onResourceStart" then for _, player in pairs(getElementsByType("player")) do local acc = getPlayerAccount(player) if not isGuestAccount(acc) then setElementData( source, "ID", getAccountID(acc) or "N/A" ) end end end end addEventHandler("onResourceStart", resourceRoot, Start_Id) addEventHandler("onPlayerLogout", root, Start_Id) addEventHandler("onPlayerLogin", root, Start_Id) função getPlayerID (id) v = false para i, player em ipairs (getElementsByType ("player")) faz se getElementData (player, "ID") == id em seguida v = player break end end return v end - === ==================================================== ==================================================== ===================== - - =========================== ==== - ----------- ID PLAYER ------------ - ================= ============ - função getnick (jogador, comando, id, ...) if (id) então local playerID = número (id) if (playerID) e local Player2 = getPlayerID (playerID) se (Player2) e outputChatBox ("# 00ff00✘ #ffffffINFO # 00ff00✘➺ #ffffff Nome do jogador # 00ff00" .. getPlayerName (player2) .. "", player, 255.255.255, verdadeiro) else outputChatBox ("# 00ff00✘ #ffffffERRO # 00ff00✘➺ #ffffff O Jogador (a) de ID: # 00ff00 (" .. id .. ") # ffffff Não foi encontrado! ", player, 255.255.255, verdadeiro) end else outputChatBox (" # 00ff00✘ #ffffffERRO # 00ff00✘➺ #ffffff ID: # 00ff00 (".. id ..") # ffffffInválido! ", player, 255.255.255,verdadeiro) fim mais outputChatBox ("# 00ff00✘ #ffffffERRO # 00ff00✘➺ #ffffffUse / id # 00ff00 [# ffffffID # 00ff00]", player, 255.255.255, true) end end addCommandHandler ("id", getnick) alguem pode me ajudar?
  7. jaqee

    Too Buggy

    Im having trouble when connecting to servers i get many bugs.. some servers i get low FPS and some of the i cant see text's even tho those servers are working fine when using my laptop.. so i realized that the problem is in my PC i tried launching the game with the iGPU and it didnt work so i need help.. my PC specs are: CPU: Ryzen 3 2200g GPU: GTX 950 2GB RAM: 8GB i tought the CPU might be the problem since it was the last upgrade for my pc..
  8. Danya, that wasn't first time when you did teamkill. Also we can't forget of random /votekill you did. That ain't fair. If you getting bored and tired, no one keep you on server, just leave.
  9. Hydra

    object movement

    mysong = playSound3D("song.mp3", 2050.0209960938, 1510.056640625, 10.671875, true) setSoundMaxDistance(mysong, 100) local a = 0 local myObject = createObject(1775, 2050.0209960938, 1510.056640625, 10.671875, -0, 0, 178.50372314453) local ox, oy, oz = getElementPosition(myObject) function animateObject() local animMusic = 0+math.random(-a,a) moveObject(myObject, 1000, ox, oy+animMusic, oz) end addEventHandler("onClientRender", getRootElement(), animateObject) function asd() if mysong then local leftData, rightData = getSoundLevelData(mysong) if (leftData) then a = 3*(leftData/3000) end end end addEventHandler("onClientRender", getRootElement(), asd)
  10. huh ez nekem nagyon magas 🤣 Ezt az egy modot nem tudnád nekem megcsinállni? tudom hogy ezt segítség kérő nem script készítő, de légyszives ezt az egyet csináld meg, mert én ehez a Positionos scripthez nem érte A jármű mód természetesen megvan
  11. Ehhez olyan autó model kell, aminél az oldalsó ajtó egy külön komponens, mivel a komponenseket lehet mozgatni, forgatni, stb. Ha ez megvan, akkor a setVehicleComponentPosition funkcióval tudod mozgatni. Ha szép folyamatosan mozgást szeretnél, akkor egy render-eventben apránként mozgatod az elemet, vagy setTimer-el, de az "darabosabb" mozgás lesz. A getVehicleComponents funkcióval pedig a komponenseket tudod lekérdezni, a példa tök jó hozzá.
  12. Sziasztok, ez az a script amit nem bírtam megcsinállni volt egy mappám 23 file volt benne mindegyik külön-külön próbálkozás volt felidegesítettem magam, aztán kitöröltem mindet valaki tud benne segíteni, mert én nem bírom megcsinállni az 1x biztos
  13. Olá galera tudo bem? estou com uma dúvida, alguem poderia por gentileza ajudar? Estou usando o emprego de "Entregador de Jornais" do AirNew, no entanto eu retirei o script da agencia, o player entra no emprego direto no local de trabalho! Eu queria que quando ele fosse pegar o emprego (BindKey = k) houvesse uma restrição por level (Lv 5), (mod level já instalado), no caso uma mensagem dizendo que ele não tem level suficiente como proceder? Desde já obrigado! Client-Side --[[ ################################################ # # # 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, "JORNALEIRO", false) rotas = guiCreateGridList(x*20, y*40, x*450, y*275, false, myWindow) guiWindowSetSizable(myWindow, false) guiSetAlpha(rotas, x*0.70) guiGridListAddColumn( rotas, "Rotas", x*1.20 ) 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, "Iniciar", 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("[ #00FF73Brasil Virtual #ffffff] - Selecione 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-Side MarkerSafeEntregadorDeJornal = createMarker( 1417.9403076172, -1687.3420410156, 13.546875, "cylinder", 35, 0, 255, 0, 0) EntregadorDeJornalPickup = createPickup ( 1412.0852050781, -1699.9636230469, 13.539485931396, 3, 1239) MarkerEntregadorDeJornal = createMarker ( 1412.0852050781, -1699.9636230469, 13.539485931396, "cylinder", 1.2, 255, 255, 255, 0 ) attachElements ( MarkerEntregadorDeJornal, EntregadorDeJornalPickup, 0, 0, -1 ) BlipEntregadorDeJornal = createBlipAttachedTo ( MarkerEntregadorDeJornal, 42 ) setBlipVisibleDistance ( BlipEntregadorDeJornal, 150 ) function CancelarSumirPickup ( player ) cancelEvent() end addEventHandler ( "onPickupHit", EntregadorDeJornalPickup, CancelarSumirPickup ) LetraParaMarkers = "k" cmd1 = "hq" cmd2 = "profissao" local HQEntregadorDeJornalBlip = createBlip ( 1417.9403076172, -1687.3420410156, 13.546875 ) 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" ) == "Jornaleiro" then return end VerificarBlipEmprego(pl) end end end, 3000,0) -------------------------------------------------------------------- function ComandoHQ ( source ) if getElementData ( source, "Emprego" ) == "Jornaleiro" 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 ) setElementData ( source, "Emprego", "Jornaleiro" ) exports.Scripts_Dxmessages:outputDx(source, "Você Agora Trabalha de Jornaleiro, Para Mais Informações Digite ( /Profissao )", "success") 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", "Jornaleiro" ) exports.Scripts_Dxmessages:outputDx(source, "Você se Demitiu do Emprego de Jornaleiro com Sucesso!", "warning") end -------------------------------------------------------------------- function ComandosProf ( ThePlayer ) if getElementData ( ThePlayer, "Emprego" ) == "Jornaleiro" then playSoundFrontEnd ( ThePlayer, 43 ) outputChatBox ( "#DF3A01~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #EFFBEFJORNALEIRO #DF3A01~~~~~~~~~~~~~~~~~~~~~~~~~~~~", ThePlayer, 255, 255, 255, true ) outputChatBox ( "#DF3A01» #EFFBEFComandos da Profissão de Jornaleiro:", ThePlayer, 255, 255, 255, true ) outputChatBox ( "#DF3A01» #DF3A01/hq #ffffff- #EFFBEFPara Marcar ou Desmarcar a sede do seu Local de Trabalho", ThePlayer, 255, 255, 255, true ) outputChatBox ( "#DF3A01» #DF3A01/entregarjornais #ffffff- #EFFBEFAbre a Lista de Rotas Disponiveis Para Trabalhar", ThePlayer, 255, 255, 255, true ) outputChatBox ( "#DF3A01» #EFFBEFMonte na Bicicleta e Digite #DF3A01/entregarjornais", ThePlayer, 255, 255, 255, true ) outputChatBox ( "#DF3A01» #EFFBEFSelecione uma rota de entrega e Siga os checkpoints no Mapa (F11)", ThePlayer, 255, 255, 255, true ) outputChatBox ( "#DF3A01» #EFFBEFQuando concluir as entregas você receberá uma #DBA901comissão", ThePlayer, 255, 255, 255, true ) outputChatBox ( "#DF3A01~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #EFFBEFJORNALEIRO #DF3A01~~~~~~~~~~~~~~~~~~~~~~~~~~~~", 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" ) == "Jornaleiro" then exports.Scripts_OnMarkerMsgs_:create(source,"Aperte 'K' Para se Demitir do Emprego de Jornaleiro") bindKey ( source, LetraParaMarkers, "down", RecusarEmprego02 ) else exports.Scripts_OnMarkerMsgs_:create(source,"Aperte 'K' Para Aceitar o Emprego de Jornaleiro") 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(510, 1417.8991699219, -1694.3439941406, 13.0, 0, 0, 270 ), createVehicle(510, 1417.8991699219, -1694.3439941406 +4, 13.0, 0, 0, 270 ), createVehicle(510, 1417.8991699219, -1694.3439941406 +6, 13.0, 0, 0, 270 ), createVehicle(510, 1417.8991699219, -1694.3439941406 +2, 13.0, 0, 0, 270 ), createVehicle(510, 1417.8991699219, -1694.3439941406 +8, 13.0, 0, 0, 270 ), createVehicle(510, 1417.8991699219, -1694.3439941406 +10, 13.0, 0, 0, 270 ), createVehicle(510, 1417.8991699219, -1694.3439941406 +12, 13.0, 0, 0, 270 ), createVehicle(510, 1417.8991699219, -1694.3439941406 +14, 13.0, 0, 0, 270 ), createVehicle(510, 1417.8991699219, -1694.3439941406 +16, 13.0, 0, 0, 270 ), createVehicle(510, 1417.8991699219, -1694.3439941406 +18, 13.0, 0, 0, 270 ), createVehicle(510, 1417.8991699219, -1694.3439941406 +20, 13.0, 0, 0, 270 ), createVehicle(510, 1417.8991699219, -1694.3439941406 -2, 13.0, 0, 0, 270 ), createVehicle(510, 1417.8991699219, -1694.3439941406 +22, 13.0, 0, 0, 270 ), } for i, veh in ipairs(VeiculosComDataEntregadorDeJornal) do setElementData ( veh, "Emprego", "Jornaleiro" ) setVehicleDamageProof(veh,true) setVehicleColor( veh, 255, 255, 255 ) setVehiclePlateText ( veh, "BRV" ) 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 == "Jornaleiro" then else cancelEvent() exports.Scripts_Dxmessages:outputDx(thePlayer, "Esse Veiculo é Exclusivo dos Jornaleiros!", "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, 60000,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 = { ["Los Santos - Favelas - 20 Entregas - Comissão: $300"] = { {1429.9464111328, -1905.8059082031, 13.773780822754}, {1375.8276367188, -1918.4099121094, 19.122716903687}, {1270.9599609375, -1902.0228271484, 28.374183654785}, {1309.2713623047, -1961.1942138672, 29.166717529297}, {1405.7294921875, -2045.7346191406, 54.065727233887}, {1301.8836669922, -2048.9123535156, 58.464176177979}, {1244.1116943359, -2053.9213867188, 59.876438140869}, {1279.3021240234, -2031.7036132813, 58.958137512207}, {1133.7977294922, -2025.0975341797, 69.000610351563}, {1134.2821044922, -2098.537109375, 71.074172973633}, {1092.1948242188, -2125.5886230469, 67.255599975586}, {1045.2015380859, -2186.7719726563, 40.421051025391}, {1161.7659912109, -2165.134765625, 64.786643981934}, {1188.5417480469, -2331.0920410156, 14.28927230835}, {1229.0968017578, -2203.7377929688, 37.594787597656}, {1347.48828125, -2103.5290527344, 46.227912902832}, {1411.4415283203, -2085.2429199219, 43.614170074463}, {1452.4599609375, -2092.7153320313, 35.114093780518}, {1480.2470703125, -2023.3793945313, 31.805692672729}, {1515.3037109375, -2010.2598876953, 28.44634437561}, }, ["Los Santos - Ganton/Temple - 20 Entregas - Comissão: $200"] = { {2494.3081054688, -1684.810546875, 12.510766983032}, {2512.0192871094, -1689.4036865234, 13.544955253601}, {2511.7531738281, -1651.3133544922, 13.91447353363}, {2409.0688476563, -1671.6916503906, 13.580268859863}, {2362.8149414063, -1646.5299072266, 13.53059387207}, {2389.9978027344, -1717.0043945313, 13.60608291626}, {2504.3889160156, -1788.6654052734, 13.555590629578}, {2609.7587890625, -1849.3317871094, 3.2896952629089}, {2560.2180175781, -1802.0985107422, 1.640625}, {2521.1306152344, -1917.3314208984, 13.589694976807}, {2419.9372558594, -1914.8271484375, 13.546899795532}, {2437.5512695313, -1790.1809082031, 13.554225921631}, {2324.8544921875, -1796.3190917969, 13.546875}, {2155.7231445313, -1700.7188720703, 15.0859375}, {2141.8076171875, -1607.6066894531, 14.187998771667}, {2072.1538085938, -1628.64453125, 13.546875}, {2069.1791992188, -1731.5767822266, 13.87615776062}, {1985.9375, -1718.9539794922, 15.969563484192}, {1961.2664794922, -1562.8210449219, 13.609630584717}, {1863.8009033203, -1599.7763671875, 13.868625640869}, }, ["Los Santos - Richman - 20 Entregas - Comissão: $100"] = { {230.03106689453, -1400.8328857422, 51.590793609619}, {260.44561767578, -1363.5102539063, 53.109375}, {167.86294555664, -1344.1441650391, 69.553092956543}, {290.69464111328, -1331.0395507813, 53.444843292236}, {356.9423828125, -1275.7287597656, 53.829723358154}, {422.85809326172, -1262.6413574219, 51.580940246582}, {633.45733642578, -1119.3950195313, 45.719078063965}, {696.92242431641, -1058.3994140625, 49.402328491211}, {724.82531738281, -994.73333740234, 52.623596191406}, {790.10278320313, -844.86358642578, 60.641288757324}, {832.16638183594, -858.89892578125, 69.921875}, {837.51416015625, -891.27130126953, 68.768898010254}, {930.03179931641, -852.59350585938, 93.500045776367}, {977.28454589844, -826.35040283203, 96.275825500488}, {1029.8919677734, -807.95526123047, 101.8515625}, {1092.6324462891, -798.84069824219, 107.41916656494}, {1107.7619628906, -731.60491943359, 100.61921691895}, {1242.3199462891, -745.32543945313, 94.904930114746}, {1356.48828125, -616.41851806641, 109.1328125}, {1496.6713867188, -697.98297119141, 94.75}, }, } pay = { ["Los Santos - Favelas - 20 Entregas - Comissão: $300"] = 300, ["Los Santos - Ganton/Temple - 20 Entregas - Comissão: $200"] = 200, ["Los Santos - Richman - 20 Entregas - Comissão: $100"] = 100, } 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 Sua Comissão 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" ) == "Jornaleiro" 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 == "Jornaleiro" 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 == 510 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("entregarjornais",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 Bike, Entregas 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 ~= "Jornaleiro" 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)
  14. Tut

    object movement

    It's better asked in the Scripting section, moving there.
  15. Olá galera tudo bem? estou com uma dúvida, alguem poderia por gentileza ajudar? Estou usando o emprego de "Entregador de Jornais" do AirNew, no entanto eu retirei o script da agencia, o player entra no emprego direto no local de trabalho! Eu queria que quando ele fosse pegar o emprego (BindKey = k) houvesse uma restrição por level (Lv 5), (mod level já instalado), no caso uma mensagem dizendo que ele não tem level suficiente como proceder? Desde já obrigado! Client-side: --[[ ################################################ # # # 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, "JORNALEIRO", false) rotas = guiCreateGridList(x*20, y*40, x*450, y*275, false, myWindow) guiWindowSetSizable(myWindow, false) guiSetAlpha(rotas, x*0.70) guiGridListAddColumn( rotas, "Rotas", x*1.20 ) 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, "Iniciar", 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("[ #00FF73Brasil Virtual #ffffff] - Selecione 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-side: MarkerSafeEntregadorDeJornal = createMarker( 1417.9403076172, -1687.3420410156, 13.546875, "cylinder", 35, 0, 255, 0, 0) EntregadorDeJornalPickup = createPickup ( 1412.0852050781, -1699.9636230469, 13.539485931396, 3, 1239) MarkerEntregadorDeJornal = createMarker ( 1412.0852050781, -1699.9636230469, 13.539485931396, "cylinder", 1.2, 255, 255, 255, 0 ) attachElements ( MarkerEntregadorDeJornal, EntregadorDeJornalPickup, 0, 0, -1 ) BlipEntregadorDeJornal = createBlipAttachedTo ( MarkerEntregadorDeJornal, 42 ) setBlipVisibleDistance ( BlipEntregadorDeJornal, 150 ) function CancelarSumirPickup ( player ) cancelEvent() end addEventHandler ( "onPickupHit", EntregadorDeJornalPickup, CancelarSumirPickup ) LetraParaMarkers = "k" cmd1 = "hq" cmd2 = "profissao" local HQEntregadorDeJornalBlip = createBlip ( 1417.9403076172, -1687.3420410156, 13.546875 ) 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" ) == "Jornaleiro" then return end VerificarBlipEmprego(pl) end end end, 3000,0) -------------------------------------------------------------------- function ComandoHQ ( source ) if getElementData ( source, "Emprego" ) == "Jornaleiro" 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 ) setElementData ( source, "Emprego", "Jornaleiro" ) exports.Scripts_Dxmessages:outputDx(source, "Você Agora Trabalha de Jornaleiro, Para Mais Informações Digite ( /Profissao )", "success") 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", "Jornaleiro" ) exports.Scripts_Dxmessages:outputDx(source, "Você se Demitiu do Emprego de Jornaleiro com Sucesso!", "warning") end -------------------------------------------------------------------- function ComandosProf ( ThePlayer ) if getElementData ( ThePlayer, "Emprego" ) == "Jornaleiro" then playSoundFrontEnd ( ThePlayer, 43 ) outputChatBox ( "#DF3A01~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #EFFBEFJORNALEIRO #DF3A01~~~~~~~~~~~~~~~~~~~~~~~~~~~~", ThePlayer, 255, 255, 255, true ) outputChatBox ( "#DF3A01» #EFFBEFComandos da Profissão de Jornaleiro:", ThePlayer, 255, 255, 255, true ) outputChatBox ( "#DF3A01» #DF3A01/hq #ffffff- #EFFBEFPara Marcar ou Desmarcar a sede do seu Local de Trabalho", ThePlayer, 255, 255, 255, true ) outputChatBox ( "#DF3A01» #DF3A01/entregarjornais #ffffff- #EFFBEFAbre a Lista de Rotas Disponiveis Para Trabalhar", ThePlayer, 255, 255, 255, true ) outputChatBox ( "#DF3A01» #EFFBEFMonte na Bicicleta e Digite #DF3A01/entregarjornais", ThePlayer, 255, 255, 255, true ) outputChatBox ( "#DF3A01» #EFFBEFSelecione uma rota de entrega e Siga os checkpoints no Mapa (F11)", ThePlayer, 255, 255, 255, true ) outputChatBox ( "#DF3A01» #EFFBEFQuando concluir as entregas você receberá uma #DBA901comissão", ThePlayer, 255, 255, 255, true ) outputChatBox ( "#DF3A01~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #EFFBEFJORNALEIRO #DF3A01~~~~~~~~~~~~~~~~~~~~~~~~~~~~", 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" ) == "Jornaleiro" then exports.Scripts_OnMarkerMsgs_:create(source,"Aperte 'K' Para se Demitir do Emprego de Jornaleiro") bindKey ( source, LetraParaMarkers, "down", RecusarEmprego02 ) else exports.Scripts_OnMarkerMsgs_:create(source,"Aperte 'K' Para Aceitar o Emprego de Jornaleiro") 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(510, 1417.8991699219, -1694.3439941406, 13.0, 0, 0, 270 ), createVehicle(510, 1417.8991699219, -1694.3439941406 +4, 13.0, 0, 0, 270 ), createVehicle(510, 1417.8991699219, -1694.3439941406 +6, 13.0, 0, 0, 270 ), createVehicle(510, 1417.8991699219, -1694.3439941406 +2, 13.0, 0, 0, 270 ), createVehicle(510, 1417.8991699219, -1694.3439941406 +8, 13.0, 0, 0, 270 ), createVehicle(510, 1417.8991699219, -1694.3439941406 +10, 13.0, 0, 0, 270 ), createVehicle(510, 1417.8991699219, -1694.3439941406 +12, 13.0, 0, 0, 270 ), createVehicle(510, 1417.8991699219, -1694.3439941406 +14, 13.0, 0, 0, 270 ), createVehicle(510, 1417.8991699219, -1694.3439941406 +16, 13.0, 0, 0, 270 ), createVehicle(510, 1417.8991699219, -1694.3439941406 +18, 13.0, 0, 0, 270 ), createVehicle(510, 1417.8991699219, -1694.3439941406 +20, 13.0, 0, 0, 270 ), createVehicle(510, 1417.8991699219, -1694.3439941406 -2, 13.0, 0, 0, 270 ), createVehicle(510, 1417.8991699219, -1694.3439941406 +22, 13.0, 0, 0, 270 ), } for i, veh in ipairs(VeiculosComDataEntregadorDeJornal) do setElementData ( veh, "Emprego", "Jornaleiro" ) setVehicleDamageProof(veh,true) setVehicleColor( veh, 255, 255, 255 ) setVehiclePlateText ( veh, "BRV" ) 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 == "Jornaleiro" then else cancelEvent() exports.Scripts_Dxmessages:outputDx(thePlayer, "Esse Veiculo é Exclusivo dos Jornaleiros!", "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, 60000,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 = { ["Los Santos - Favelas - 20 Entregas - Comissão: $300"] = { {1429.9464111328, -1905.8059082031, 13.773780822754}, {1375.8276367188, -1918.4099121094, 19.122716903687}, {1270.9599609375, -1902.0228271484, 28.374183654785}, {1309.2713623047, -1961.1942138672, 29.166717529297}, {1405.7294921875, -2045.7346191406, 54.065727233887}, {1301.8836669922, -2048.9123535156, 58.464176177979}, {1244.1116943359, -2053.9213867188, 59.876438140869}, {1279.3021240234, -2031.7036132813, 58.958137512207}, {1133.7977294922, -2025.0975341797, 69.000610351563}, {1134.2821044922, -2098.537109375, 71.074172973633}, {1092.1948242188, -2125.5886230469, 67.255599975586}, {1045.2015380859, -2186.7719726563, 40.421051025391}, {1161.7659912109, -2165.134765625, 64.786643981934}, {1188.5417480469, -2331.0920410156, 14.28927230835}, {1229.0968017578, -2203.7377929688, 37.594787597656}, {1347.48828125, -2103.5290527344, 46.227912902832}, {1411.4415283203, -2085.2429199219, 43.614170074463}, {1452.4599609375, -2092.7153320313, 35.114093780518}, {1480.2470703125, -2023.3793945313, 31.805692672729}, {1515.3037109375, -2010.2598876953, 28.44634437561}, }, ["Los Santos - Ganton/Temple - 20 Entregas - Comissão: $200"] = { {2494.3081054688, -1684.810546875, 12.510766983032}, {2512.0192871094, -1689.4036865234, 13.544955253601}, {2511.7531738281, -1651.3133544922, 13.91447353363}, {2409.0688476563, -1671.6916503906, 13.580268859863}, {2362.8149414063, -1646.5299072266, 13.53059387207}, {2389.9978027344, -1717.0043945313, 13.60608291626}, {2504.3889160156, -1788.6654052734, 13.555590629578}, {2609.7587890625, -1849.3317871094, 3.2896952629089}, {2560.2180175781, -1802.0985107422, 1.640625}, {2521.1306152344, -1917.3314208984, 13.589694976807}, {2419.9372558594, -1914.8271484375, 13.546899795532}, {2437.5512695313, -1790.1809082031, 13.554225921631}, {2324.8544921875, -1796.3190917969, 13.546875}, {2155.7231445313, -1700.7188720703, 15.0859375}, {2141.8076171875, -1607.6066894531, 14.187998771667}, {2072.1538085938, -1628.64453125, 13.546875}, {2069.1791992188, -1731.5767822266, 13.87615776062}, {1985.9375, -1718.9539794922, 15.969563484192}, {1961.2664794922, -1562.8210449219, 13.609630584717}, {1863.8009033203, -1599.7763671875, 13.868625640869}, }, ["Los Santos - Richman - 20 Entregas - Comissão: $100"] = { {230.03106689453, -1400.8328857422, 51.590793609619}, {260.44561767578, -1363.5102539063, 53.109375}, {167.86294555664, -1344.1441650391, 69.553092956543}, {290.69464111328, -1331.0395507813, 53.444843292236}, {356.9423828125, -1275.7287597656, 53.829723358154}, {422.85809326172, -1262.6413574219, 51.580940246582}, {633.45733642578, -1119.3950195313, 45.719078063965}, {696.92242431641, -1058.3994140625, 49.402328491211}, {724.82531738281, -994.73333740234, 52.623596191406}, {790.10278320313, -844.86358642578, 60.641288757324}, {832.16638183594, -858.89892578125, 69.921875}, {837.51416015625, -891.27130126953, 68.768898010254}, {930.03179931641, -852.59350585938, 93.500045776367}, {977.28454589844, -826.35040283203, 96.275825500488}, {1029.8919677734, -807.95526123047, 101.8515625}, {1092.6324462891, -798.84069824219, 107.41916656494}, {1107.7619628906, -731.60491943359, 100.61921691895}, {1242.3199462891, -745.32543945313, 94.904930114746}, {1356.48828125, -616.41851806641, 109.1328125}, {1496.6713867188, -697.98297119141, 94.75}, }, } pay = { ["Los Santos - Favelas - 20 Entregas - Comissão: $300"] = 300, ["Los Santos - Ganton/Temple - 20 Entregas - Comissão: $200"] = 200, ["Los Santos - Richman - 20 Entregas - Comissão: $100"] = 100, } 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 Sua Comissão 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" ) == "Jornaleiro" 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 == "Jornaleiro" 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 == 510 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("entregarjornais",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 Bike, Entregas 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 ~= "Jornaleiro" 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)
  16. is there any way to make an object move to the rhythm of the music?
  17. Con una comparación entre ticks con getTickCount es suficiente y más óptimo a mi parecer.
  18. Resulcan

    Script

    race event system
  19. اللعبه يدور قصتها في الزمن الحاضر ومنضور الشخص الثالث وتشبه the evil withinو agony
  20. And the next time, I hope that you create your own topic better than requesting on another person's topic
  21. Verifique se o recurso já está funcionando E a palavra policial Não sei Use este método local policial = getTeamFromName ( "Nome do time" ) Se houver algum problema, verifique os erros usando um comando /debugscript 3 Você pode aprender mais sobre depuração aqui Debugging
  22. There is an error within your mysql resource as instead of a table it returns boolean otherwise said 'false' that means the resource could not connect or check for whatever you may check in the database, so you should check the function select in resource mysql. good luck! SQL it's not exactly my thing, so I can only tell you there is a problem there, as also I only worked with SQLite witch it's the same thing basically but SQLite it's offline.
  23. not a problem when you use OnClientPlayerTarget Check if IsPedAiming for check if the player aiming with a weapon then check if the target in OnClientPlayerTarget is NPC and if it was then use GetElementPosition for get the position of the NPC then CreateMarker with the position of the NPC and when you enter the checkpoint OnClientMarkerHit use GuiSetVisible
  24. NPC is that ped in Gta San Andreas who is walking on streets. I wanted the script for Emergency Server. Thanks for help!
  25. Installing_and_Running_MTASA_Server_on_GNU_Linux
  1. Load more activity