Jump to content

IIYAMA

Moderators
  • Posts

    6,097
  • Joined

  • Last visited

  • Days Won

    218

Everything posted by IIYAMA

  1. IIYAMA

    dx movement

    by changing the text position with every frame you render.
  2. sorry, but this is just crap. local's can't leave the 'if' block. and much more mistakes.
  3. simply the one that sends the map.
  4. IIYAMA

    Ping 0

    oh you have to do a lot more. - create a playerTable - use a loop - check their getNetworkStats - kick kickPlayer function etc.
  5. IIYAMA

    Ping 0

    something like that.
  6. IIYAMA

    Ping 0

    https://wiki.multitheftauto.com/wiki/GetNetworkStats
  7. Nothing is impossible, my server is already using a system that can do that or even more. But I won't start talking about that because you simply can't use my property... What you can try is using the event's to save the last vehicle etc. https://wiki.multitheftauto.com/wiki/OnVehicleEnter https://wiki.multitheftauto.com/wiki/OnVehicleExit https://wiki.multitheftauto.com/wiki/OnVehicleExplode If you really want to create something like that, You have to create your own system to manage the data, you can choose for elementdata or using tables for quick data usage. If you can work with tables, use tables cause they are 1000+ times faster with data then elementdata. Good luck cause you still have a long way to go for perfection.
  8. what doesn't work about it? Explosions aren't damage cause of the vehicle. Only when you ram a player with it, it will be the vehicle.
  9. IIYAMA

    ped health

    You don't need to show your code for that, the answer is yes. You can use it on all elements that can have health. (ped's, players and vehicles)
  10. yes, correct.
  11. if #getVehicleOccupants (source ) == 0 then ?
  12. IIYAMA

    [Question]

    https://wiki.multitheftauto.com/wiki/Ge ... actElement When a player is at the roof/(or what ever) of a vehicle.
  13. Take a close look to this page and don't define playerSource as the (dead)player his last ammo -_-" LUA:5 https://wiki.multitheftauto.com/wiki/OnPlayerWasted The killer can also be nil. LUA:17 if killer then You can take more of my time if you solve at least those problems.
  14. @CastielRecords Maybe you should find the definition of 'bro', because I am not even close your "bro". I am relaxed, telling me that I should relax will cause the opposite. I will not visiting this subtopic any more, post anything after this towards me would be useless.
  15. myTable = {} myTable[player] = {}
  16. function win(ammo, killer, weapon, bodypart) if (killer and getElementType(killer) == "player" and killer ~= source) then local H = getElementData(killer, "XP") or 0 --local S = getElementData(killer, "Level") local killer1 = getPlayerName(killer) local noob = getPlayerName(source) local X = math.random(5, 70) setElementData(killer, "XP", tonumber(H)+X) local H = tonumber(H) + X if tonumber(H) <= 100 then setElementData(killer, "Level", "Lvl 0") elseif tonumber(H) <= 400 then setElementData(killer, "Level", "Lvl 1") elseif tonumber(H) <= 600 then setElementData(killer, "Level", "Lvl 2") elseif tonumber(H) <= 800 then setElementData(killer, "Level", "Lvl 3") elseif tonumber(H) <= 1000 then setElementData(killer, "Level", "Lvl 4") elseif tonumber(H) <= 1200 then setElementData(killer, "Level", "Lvl 5") elseif tonumber(H) <= 1400 then setElementData(killer, "Level", "Lvl 6") elseif tonumber(H) <= 1600 then setElementData(killer, "Level", "Lvl 7") elseif tonumber(H) <= 1800 then setElementData(killer, "Level", "Lvl 8") elseif tonumber(H) <= 2000 then setElementData(killer, "Level", "Lvl 9") elseif tonumber(H) <= 2200 then setElementData(killer, "Level", "Lvl 10") elseif tonumber(H) <= 2400 then setElementData(killer, "Level", "Lvl 11") elseif tonumber(H) <= 2600 then setElementData(killer, "Level", "Lvl 12") elseif tonumber(H) <= 2800 then setElementData(killer, "Level", "Lvl 13") elseif tonumber(H) <= 4000 then setElementData(killer, "Level", "Lvl 14") elseif tonumber(H) <= 4200 then setElementData(killer, "Level", "Lvl 15") elseif tonumber(H) <= 4400 then setElementData(killer, "Level", "Lvl 16") elseif tonumber(H) <= 4600 then setElementData(killer, "Level", "Lvl 17") elseif tonumber(H) <= 4800 then setElementData(killer, "Level", "Lvl 18") elseif tonumber(H) <= 4900 then setElementData(killer, "Level", "Lvl 19") elseif tonumber(H) <= 7000 then setElementData(killer, "Level", "Lvl 20") elseif tonumber(H) <= 9000 then setElementData(killer, "Level", "Lvl 21") elseif tonumber(H) <= 15999 then setElementData(killer, "Level", "Lvl 22") elseif tonumber(H) > 15999 then setElementData(killer, "Level", "Lvl 23") end end end addEventHandler( "onPlayerWasted", getRootElement(), win) function onLogin (_,account) setElementData(source, "Level", getAccountData(account, "LV") or "Lvl 0") setElementData(source, "XP", getAccountData(account, "EXP") or 0) end addEventHandler ("onPlayerLogin", root, onLogin) function saveData(thePlayer, theAccount) --local theAccount = getPlayerAccount(source) -- you already have the account..... fu nonsens ! if (theAccount and not isGuestAccount(theAccount)) then setAccountData (theAccount, "LV", getElementData(thePlayer, "Level") or 0) setAccountData (theAccount, "EXP", getElementData(thePlayer, "XP") or 0) end end addEventHandler ("onPlayerQuit", root, function () saveData(source, getPlayerAccount(source)) end) addEventHandler ("onPlayerLogout", root, function (prev) saveData(source, prev) end) If you say again that it didn't work or bumb again I will start give sarcastic comments on all your fu topics.
  17. well I am not going to find all code mistakes... But: testFunction(getElementData(dxElement,"handledFunction")) break instead of: return getElementData(dxElement,"handledFunction")
  18. so what? You can't call it a FPS calculator, cause it isn't frames per second.
  19. I have also been testing fps counters, it is very usefully to check the amount of time between the frames. Especially when you want to check somebody his lagg's. But onClientRender triggers just the amount of frames and you are using time to calculate this. A normal FPS counter will automatic do math.ceil because it doesn't count half frames. Time isn't a frame, you never will know how many frames have been past in this second. This isn't a Frames Per Second counter, but a Timer Per Frame calculation.
  20. you put it serverside?
  21. you are returning to a handler function, with that you are also breaking your main loop.
  22. addEventHandler("onClientRender",root,moveElement,posX,posY)
  23. function moveElement(posX,posY) if (posX > endX) then setElementData(dxElement,"posX",posX - speed) elseif (posX < endX) then setElementData(dxElement,"posX",posX + speed) end if (posY > endY) then setElementData(dxElement,"posX",posY - speed) elseif (posY < endY) then setElementData(dxElement,"posX",posY + speed) end if (posY == endY) and (posX == endX) then removeEventHandler("onClientRender",root,moveElement) end end function dxMoveElement(dxElement,endX,endY,speed) local posX = getElementData(dxElement,"posX") local posY = getElementData(dxElement,"posY") addEventHandler("onClientRender",root,moveElement) end
  24. Well I didn't mention that you are a beginner, I asked it because I can't work with shader files, I simply don't see logistic with in .fx It simply doesn't make any sense in my opinion, but it would be great if you can work with it.
  25. Why do you need to test with the editor? You can also test it manually, by just start it from admin after you saved it and put the meta back.
×
×
  • Create New...