Tommy.

Members
  • Content Count

    120
  • Joined

  • Last visited

Community Reputation

39 Good

6 Followers

About Tommy.

  • Rank
    Sucka
  • Birthday 03/05/2001

Details

  • Gang
    INFINITY PLAY
  • Location
    Blumenau - Brazil
  • Occupation
    Developer/ Lua, Php, Html, Js, Css, Mysql
  • Interests
    Knowledge

Recent Profile Visitors

1,468 profile views
  1. Sem nenhum código fica difícil de te ajudar.
  2. 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!
  3. 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!
  4. 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!
  5. 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 ?
  6. 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 )
  7. Exemplo básico: pizzaria = createElement("pizzaria") setElementData(pizzaria, "Pizza", 0) nesse caso ai vai ter 0 pizza no elemento pizzaria.
  8. 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
  9. Bom, quando você estiver no PC e quiser enviar aqui pra eu te ajudar.
  10. 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
  11. try to change theBrowser to initBrowser addEventHandler("onClientBrowserCreated", initBrowser, function()
  12. 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 " - "
  13. Sim, funciona, tem que editar uma animação que não interfere na perna
  14. se estiver usando IFP edite uma animação nativa do gta:sa que isso é possível