Jump to content

Tommy.

Members
  • Posts

    226
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by Tommy.

  1. Que estranho, quando crasha mostra alguma mensagem ?
  2. Não entendi muito bem, mas você ta querendo que o radar só apareça quando entrar em um veículo ?
  3. I redid the homepage with a more modern and flat design, i remove all the messages that I find "useless" and left only the main one. I tried to make the page as good as possible but with the completely redone design. Image created in: Photoshop
  4. usa: getElementData setElementData getAccountData setAccountData Quando o jogador sair você usa o getElementData e setAccountData Quando o jogar logar você usa o getAccountData e setElementData
  5. Sem nenhum código fica difícil de te ajudar.
  6. You can not do that, elementData is temporary, what you can that about is using setAccountData (when the player leaves save elementData) and getAccountData (get the data saved by the account) Try this: -- load elementData function load(_, account) local name = getAccountData(account, "name") or "N/A" setElementData(source, "name", name) end addEventHandler("onPlayerLogin", getRootElement(), load) -- save elementData function save() local name = getElementData(source, "name") or "N/A" setAccountData(getPlayerAccount(source), "name", name) end addEventHandler("onPlayerQuit", getRootElement(), save) -- find elementAccount function find (source, cmd, playerAccount) if cmd and playerAccount then if getAccount(playerAccount) then local gName = getAccountData(getAccount(playerAccount), "name") outputChatBox("Name of "..playerAccount.." is #FFFFFF"..""..gName, source, 152, 95, 161, true) end end end addCommandHandler("find", find) EDIT: I do not tested!
  7. Tente isso: function bag(player) local x, y, z = getElementPosition(player) bag1 = createObject(1550, x, y, z) attachElements(bag1, player) end addCommandHandler("bag", bag) EDIT: Não testei!
  8. Tente isso, não é a melhor maneira mas deve funcionar. addEventHandler("onResourceStart", resourceRoot, function() for i, player in ipairs(getElementsByType("player")) do bindKey(player,"m", "down", toggleSit) bindKey(player,"m", "up", toggleSit) end end) function toggleSit(thePlayer) if seat == false then setPedAnimation(thePlayer, "ped", "IDLE_taxi", -1, false, false, false, false) seat = true elseif seat == true then setPedAnimation(thePlayer) seat = false end end Não testei!
  9. pelo o que pude ver se a vida do cara é maior que 35 ele cai se for menor ele não leva dano. o certo não séria, se a vida for menor que 35 ele cair e se for maior ele levar dano ?
  10. Tente isso: hpMin = 15 Tempo = {} ColMedic = {} 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 function ChecarVida() for i, player in pairs (getElementsByType("player")) do if not getElementData(player, "PlayerCaido") then local conta = getAccountName(getPlayerAccount(player)) if getElementHealth(player) >= 1 then if getElementHealth(player) <= hpMin then removePedFromVehicle(player) setElementData(player, "PlayerCaido", true) setElementFrozen(player, true) setPedAnimation(player, "CRACK", "crckdeth3", -1, false, true, false) setTimer(function() if getElementData(player, "PlayerCaido") then killPlayer(player) end end, 240000, 1) end end else setPedAnimation(player, "CRACK", "crckdeth3", -1, false, true, false) end end end setTimer(ChecarVida, 200, 0) function ChecarVidaA() for i, player in pairs (getElementsByType("player")) do if getElementData(player, "PlayerCaido") then local conta = getAccountName(getPlayerAccount(player)) if getElementHealth(player) >= 31 then setElementData(player, "PlayerCaido", false) setPedAnimation(player, false) setElementFrozen(player, false ) end end end end setTimer(ChecarVidaA, 200, 0) function SetarCaidoComHS() player = source if not getElementData(player, "PlayerCaido") then removePedFromVehicle(player) setElementHealth(player, 20) setElementData(player, "PlayerCaido", true) setElementFrozen(player, true) setPedAnimation(player, "CRACK", "crckdeth3", -1, false, true, false) setTimer(function() if getElementData(player, "PlayerCaido") then killPlayer(player) end end, 240000, 1) end end addEvent("OnHS", true) addEventHandler("OnHS", getRootElement(), SetarCaidoComHS) function curar_jogador ( thePlayer, comando, nick ) if nick then if getPlayerFromPartialName ( nick ) then local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Samu") ) then local player_a_ser_curado = getPlayerFromPartialName ( nick ) local samux, samuy, samuz = getElementPosition ( thePlayer ) local curadox, curadoy, curadoz = getElementPosition ( player_a_ser_curado ) local dist = getDistanceBetweenPoints3D ( samux, samuy, samuz, curadox, curadoy, curadoz ) if player_a_ser_curado == thePlayer then outputChatBox("#bebebeVocê não pode se curar!",thePlayer,255,255,255,true) return end if ( dist > 3 ) then outputChatBox("#bebebeChegue mais perto do jogador!", thePlayer, 255, 255, 255, true) elseif ( dist < 3 )then setPedAnimation( thePlayer, "MEDIC", "CPR", 4500, true, false, false, false) setTimer ( function() setElementHealth ( player_a_ser_curado, 100 ) setPedAnimation(player_a_ser_curado, false) setElementFrozen( player_a_ser_curado, false ) setElementData(player_a_ser_curado,"PlayerCaido",false) setElementFrozen(player_a_ser_curado, false) end, 4500, 1 ) end end end end end addCommandHandler ( "curar", curar_jogador )
  11. Exemplo básico: pizzaria = createElement("pizzaria") setElementData(pizzaria, "Pizza", 0) nesse caso ai vai ter 0 pizza no elemento pizzaria.
  12. Bom, o que de cara você vai precisar é de: https://wiki.multitheftauto.com/wiki/CreateElement https://wiki.multitheftauto.com/wiki/SetElementData https://wiki.multitheftauto.com/wiki/GetElementData
  13. Bom, quando você estiver no PC e quiser enviar aqui pra eu te ajudar.
  14. bom, como geralmente os id são salvos como "ID" use isso no chat: getElementData(source, "ID") Pode não funcionar com essa parâmetros dependendo de como está o seu sistema de ID e CHAT
  15. try to change theBrowser to initBrowser addEventHandler("onClientBrowserCreated", initBrowser, function()
  16. I do not understand what you are trying to do, could you explain better? function doChat(player, command, ...) if ... then local message = table.concat({...}, "") for i, v in pairs(getElementsByType("player")) do local x, y, z = getElementPosition(player) local xt, yt, zt = getElementPosition(v) if getDistanceBetweenPoints3D(x, y, z, xt, yt, zt) <= 10 then outputChatBox(string.gsub(message, "*", " - ").." (" ..getPlayerName(player).. ")", v, 194, 162, 218, true) end end end end addEventHandler("CommmandHandler", getRootElement(), doChat) addCommandHandler("do", doChat) I did what I understood. replace "*" with " - "
  17. Sim, funciona, tem que editar uma animação que não interfere na perna
  18. se estiver usando IFP edite uma animação nativa do gta:sa que isso é possível
  19. Você está colocando em server-side ?
  20. Mostre o resource dayzconnect
  21. NPCS = { -- POSIÇÂO DO NPC = x,y,z {2164.52686, -1000.97644, 62.79298}, {2199.82104, -1010.65930, 61.88739} }, local r = math.random(1, #NPCS) local Ped_VICIADO = createPed(240, NPCS[r][1], NPCS[r][2], NPCS[r][3]) timer = setTimer(function() if Ped_VICIADO then local nr = math.random(1, #NPCS) setElementPosition(Ped_VICIADO, NPCS[nr][1], NPCS[nr][2], NPCS[nr][3]) end end, 300000, 0) EDIT: Não testei!
  22. Baixe um sistema de fome, sede e sono e altere os elementData para: AirNewSCR_Fome, AirNewSCR_Sede, AirNewSCR_Sono
×
×
  • Create New...