Tommy.

Members
  • Content Count

    124
  • Joined

  • Last visited

Community Reputation

39 Good

7 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,525 profile views
  1. Tommy.

    Call for web designers

    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
  2. 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
  3. Sem nenhum código fica difícil de te ajudar.
  4. 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!
  5. 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!
  6. 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!
  7. 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 ?
  8. 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 )
  9. Exemplo básico: pizzaria = createElement("pizzaria") setElementData(pizzaria, "Pizza", 0) nesse caso ai vai ter 0 pizza no elemento pizzaria.
  10. 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
  11. Bom, quando você estiver no PC e quiser enviar aqui pra eu te ajudar.
  12. 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