Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 19/03/21 in all areas

  1. As an adendum to the above, see this thread for more on server security.
    1 point
  2. Olá. Desligue o seu servidor, abra o acl.xml e adicione o resource.admin novamente à acl Admin, você removeu.
    1 point
  3. Thank you very much Thank you for your time and attention
    1 point
  4. my bad function onClientRender() local cx, cy, cz, lx, ly, lz = getCameraMatrix(); for k, player in pairs(g_StreamedInPlayers) do if isElement(player) and isElementStreamedIn(player) then local cargo_player = getElementData(player, "cargo") or ""; if cargo_player and cargo_player ~= "" then local vx, vy, vz = getPedBonePosition(player, 8); local dist = getDistanceBetweenPoints3D(cx, cy, cz, vx, vy, vz); if dist < drawDistance and isLineOfSightClear(cx, cy, cz, vx, vy, vz, true, false, false) then local x, y = getScreenFromWorldPosition(vx, vy, vz + 0.3); if x and y then local name = getPlayerName(player); local w = dxGetTextWidth(name, 1, "default-bold"); local h = dxGetFontHeight(1, "default-bold"); local cargo_player_cor = getElementData(player, "cargo->cor") or {255, 255, 255, 240}; dxDrawText(cargo_player..": "..name, x - 1 - w / 2, y - 1 - h - 40, w, h, tocolor(0, 0, 0), 2, "default-bold"); dxDrawColorText(cargo_player..": "..name, x - w / 2, y - h - 40, w, h, tocolor(unpack(cargo_player_cor)), 2, "default-bold"); end end end end else table.remove(g_StreamedInPlayers, k); end end addEventHandler("onClientRender", root, onClientRender);
    1 point
  5. Hey, I think that this should be useful enough for you: function ococo() local theVehicle = getPedOccupiedVehicle (localPlayer) if theVehicle then local components = getVehicleComponents(theVehicle) -- get a table with all the components of the vehicle for k in pairs (components) do --outputChatBox(k) -- UNCOMMENT to get all the component names in chat --setVehicleComponentVisible(theVehicle, k, false) -- UNCOMMENT to hide all the vehicle componenets end setVehicleComponentVisible(theVehicle, "chassis", false) -- hide only the "chassis" component end end addEventHandler ( "onClientVehicleEnter", root, ococo )
    1 point
  6. Daria pra simplesmente salvar o ID das texturas de cada veículo em uma tabela JSON dentro da conta do jogador com toJSON e setAccountData. Assim cada conta teria seus IDs salvos em cada veículo. Dai ao logar, aplicaria essas texturas salvas nos veículos. Se salvar no script, todas as configurações dos jogadores serão perdidas se reiniciar o resource. A não ser que se faça um banco de dados, que no fim das contas dá até mais trabalho do que salvar na conta do jogador.
    1 point
  7. Thank you! I'll look into it.
    1 point
  8. Hello and welcome to the Forums! I just tested a little bit the maxVelocity handling on most of the sport cars (don't know if it will be the same on the other vehicles) and found out that setting the maxVelocity to 85.5 locks the max speed to exactly 100km/h. It turns out that maxVelocity is not exactly the same as km/h value. So yeah, hope this helps!
    1 point
  9. function finalizartrab (player, dimension) -- <-- NÃO EXISTE O PARAMETRO THE VEHICLE NO ONMARKERHIT, AQUI SERIA DIMENSÃO if getElementData(player,"trabAviaoParte3") then if veh[player] and isElement(veh[player]) then local vehicle = getPedOccupiedVehicle(player) -- NÃO PRECISA COLOCAR VARIAS VARIAVEIS DE VEICULO PQ 1 JÁ BASTA if vehicle then local currentFreezeStatus = isElementFrozen ( vehicle ) local newFreezeStatus = not currentFreezeStatus setElementPosition(vehicle, 1477.443, 1712.498, 11.2 + 1.5) setElementRotation(vehicle, -0, 0, 359.225) setElementFrozen ( vehicle, true ) outputChatBox ( "[#FF0000 Aeronauta #000000]#FFFFFF Os passageiros estao deembarcando, aguarde...", player, 0, 0, 0, true ) setElementVisibleTo ( entraga3final, player, false ) setElementVisibleTo ( blipentrega3, player, false ) setElementData(player, "trabAviaoParte3", false) setElementData(player, "emTrabalho", false) setTimer (function() outputChatBox ( "[#FF0000 Aeronauta #000000]#FFFFFF Todos os passageiros deembarcaram. Voce terminou seu trabalho com sucesso!", sourplayerce, 0, 0, 0, true ) outputDebugString("[TrabAviao] "..getPlayerName(player):gsub("#%x%x%x%x%x%x","").." Completou o trabalho de aviao!",3,0,255,0) local model = getElementModel(vehicle) if model == 592 or model == 577 then outputChatBox ( "[#FF0000 Aeronauta #000000]#FFFFFF E Recebeu mais #00FF00R$45.000#FFFFFF por entregar com o Andromada ou AT-400, totalizando #00FF00R$75.000", player, 0, 0, 0, true ) givePlayerMoney (player, 45000) else outputChatBox ( "[#FF0000 Aeronauta #000000]#FFFFFF E Recebeu mais #00FF00R$30.000#FFFFFF, totalizando #00FF00R$60.000", player, 0, 0, 0, true ) givePlayerMoney (player, 30000) end destroyElement(veh[player]) veh[player] = nil end, 5000, 1) end end end end addEventHandler( "onMarkerHit", entraga3final, finalizartrab ) Você Estava Destruindo o Veiculo Dps Conferindo o Modelo Dele, Sendo que ele Não Existe Mais, Assim Causando o Erro.
    1 point
  10. Mande o código como está. Eu não vejo erros da forma que deixei o código.
    1 point
  11. veh[player] -- O índice é o player. Então, digamos que você tenha uma função ou evento desta forma: addCommandHandler("nada", function(CarlosAlbertoDeNobrega) if veh[CarlosAlbertoDeNobrega] then end end) addCommandHandler("tudo", function(user) if veh[user] then end end) addEventHandler("onMarkerHit", marker, function(AnaMariaBraga) if veh[AnaMariaBraga] then end end) Em todos daria certo, pois cada parâmetro daquele recebe o jogador, e você indexou o jogador desde o começo. O nome não importa, e sim o elemento passado.
    1 point
  12. Você indexou o jogador naquela tabela. Então você deve usar o elemento-jogador. Depende de como você definiu em cada parte do seu código.
    1 point
  13. Ainda há alguns source. Inclusive, a função setTimer precisa ter os parâmetros definidos, senão o funcionamento será afetado. Deixe assim:
    1 point
  14. Olá. Não se usa source como parâmetro de função. Além do mais, o source do evento é o marker. Use player naquele primeiro parâmetro e substitua todos esses source por player.
    1 point
×
×
  • Create New...