Jump to content

IIYAMA

Moderators
  • Posts

    6,089
  • Joined

  • Last visited

  • Days Won

    216

Everything posted by IIYAMA

  1. He puts everything through Google translate, to hell Google translate does that for him. Or the word 'guy' is his country must mean the same as 'gay', which I seriously doubt. @santinet12 There are a lot of examples of how to use the bindkey functions in here: https://wiki.multitheftauto.com/wiki/BindKey Why don't you start with applying and modifying example 1 in to your code?
  2. You should have asked that question in your main post lol. Please take a look at the example of this function, it just what you need: https://wiki.multitheftauto.com/wiki/IsTransferBoxActive
  3. Only one of them is in use, the other one is just faked, by attaching the weapon object to the ped his hand. Check this resource and it's example: https://community.multitheftauto.com/index.php?p=resources&s=details&id=2540
  4. addEventHandler("onPlayerJoin", root, function () -- he joins the server end) addEventHandler("onPlayerWasted", root, function () -- So sorry, please die again end) https://wiki.multitheftauto.com/wiki/SpawnPlayer @TorNix~|nR time to make your first attempt.
  5. Just add two new ones, for serverside and clientside. Or more if you want per functionality a file.
  6. Nice concepts, now please start coding your first attempts.
  7. Why don't you start with making the component to retrieve the upgrades first?
  8. How can we help you if we aren't allow to edit the code? The information is badly translated, I can't understand anything of it. Don't be a racist. It is really NOT OK to post racist content inside your code.
  9. AVG fps. AVG ping. Travel distance. Screenshots taken.
  10. You tell me, where is the serverside file?
  11. OH lol, waaaaaahhh!! This is NO good, hell no. =/ local newLvl = false function newLvlFunction() if not newLvl then setTimer(function() newLvl = false end,5000,1) end newLvl = true end addEvent( "onClientLevelUp", true ) addEventHandler( "onClientLevelUp", localPlayer, newLvlFunction) addEventHandler("onClientRender", root, function () if newLvl == true then dxDrawRectangle(screenW * 0.4083, screenH * 0.9037, screenW * 0.1839, screenH * 0.0528, tocolor(0, 0, 0, 160), false) dxDrawImage(screenW * 0.4094, screenH * 0.9046, screenW * 0.0271, screenH * 0.0491, ":DayZ/tools/images/flags/join.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawText("Congradulations! You have reached "..getElementData(getLocalPlayer(),"level").." Level!", screenW * 0.4385, screenH * 0.9046, screenW * 0.5901, screenH * 0.9537, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "center", false, false, false, false, false) end end) @Emix
  12. A little bit dirty, but this might work: local newLvl = false function newLvl() newLvl = true end addEvent( "onClientLevelUp", true ) addEventHandler( "onClientLevelUp", localPlayer, newLvl) addEventHandler("onClientRender", root, function () if newLvl == true then dxDrawRectangle(screenW * 0.4083, screenH * 0.9037, screenW * 0.1839, screenH * 0.0528, tocolor(0, 0, 0, 160), false) dxDrawImage(screenW * 0.4094, screenH * 0.9046, screenW * 0.0271, screenH * 0.0491, ":DayZ/tools/images/flags/join.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawText("Congradulations! You have reached "..getElementData(getLocalPlayer(),"level").." Level!", screenW * 0.4385, screenH * 0.9046, screenW * 0.5901, screenH * 0.9537, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "center", false, false, false, false, false) setTimer(function() newLvl = false end,5000,1) end end)
  13. The event you cancelled has no relationship with changing the skin, so that will not work. Use, over cancelEvent(). setElementModel( source, 0 ) And this part is incorrect: function tt() triggerServerEvent( "setplayermask", localPlayer, "zombie") if getElementModel( source ) == 308 then cancelEvent() end end addEventHandler ("onClientResourceStart", getResourceRootElement(getThisResource()), tt)
  14. Is(And to which skin afterwards?) OR on skin changed? Your code doesn't make sense and should be serverside to prevent de-sync.
  15. guiSetText(GUIEditor.edit[1], tostring(loadSavedData("username", "") or "")) guiSetText(GUIEditor.edit[2], tostring(loadSavedData("password", "") or ""))
  16. Want to learn some more? Did you ever tried to remove multiple items from a table using table.remove? If not, try it and see what happens. I will provide you with a solution to an issue you will encounter. Give it 10 items and remove 3 or more of them with your own conditions. Make sure that atleast two items are placed next to each other. Debug the table at the end. iprint(table)
  17. IIYAMA

    DX Image scaling

    If you convert them to textures. https://wiki.multitheftauto.com/wiki/DxCreateTexture And if you enable mipmaps, they are pretty good. Mipmaps will create multiple versions of the image of different scales. But remember, images ARE NOT vector files and SVG is not supported in mta.
  18. + As the pairs loop can iterate over all kinds of keys, it might not loop the items in order. local table = { "item1", "item2", "item3" } for key, data in pairs(table) do iprint(data) end The result could be: item2 item3 item1
  19. Works for me on localhost. This might solve your issue: (use it when the browser has been created) focusBrowser ( webBrowser ) focusBrowser ( nil )
  20. Here use this one, I created it a month ago. (it does also have a rotation effect, which makes it more alive) P.s 20 lines =D function dxDrawCircle3D(x, y, z, radius, width, color) if type(x) ~= "number" or type(y) ~= "number" or type(z) ~= "number" then return false end local radius = radius or 1 local width = width or 1 local color = color or tocolor(255,255,255,150) local startRotation = (getTickCount() % 5000 / 5000) * 360 for i=1, 18 do local pR1 = (((i-1)*20 + startRotation) * 3.141592653 * 2)/360 local pR2 = ((i*20 + startRotation) * 3.141592653 * 2)/360 local startX, startY = x + math.cos(pR1) * radius, y + math.sin(pR1) * radius local endX, endY = x + math.cos(pR2) * radius, y + math.sin(pR2) * radius dxDrawLine3D(startX, startY, z, endX, endY, z, color, width) end return true end
  21. You might be able to do it with: https://wiki.multitheftauto.com/wiki/TriggerEvent triggerEvent("onPlayerChat", player, "HI, I AM YOUR MOTHER!", 0) It is a kind of hack for your tag system, but should be possible. onPlayerChat parameters: string message, int messageType
  22. With this: https://wiki.multitheftauto.com/wiki/DxDrawMaterialLine3D Read the requirements, syntax and example very carefully.
  23. Hmm strange, should be placed correctly according to wiki. And if you replace the getVehicleComponentPosition line with these two lines: local offsetX, offsetY, offsetZ = getVehicleComponentPosition ( vehicle, "exhaust_ok", "root" ) x,y,z = getPositionFromElementOffset(vehicle, offsetX, offsetY, offsetZ) And add this at the bottom function getPositionFromElementOffset(element,offX,offY,offZ) local m = getElementMatrix ( element ) -- Get the matrix local x = offX * m[1][1] + offY * m[2][1] + offZ * m[3][1] + m[4][1] -- Apply transform local y = offX * m[1][2] + offY * m[2][2] + offZ * m[3][2] + m[4][2] local z = offX * m[1][3] + offY * m[2][3] + offZ * m[3][3] + m[4][3] return x, y, z -- Return the transformed point end
  24. So it is actually working. fxAddGunshot(x, y, z, -10, 0, 0, true) fxAddSparks(x, y, z, -10, 0, 0) fxAddBulletImpact(x, y, z, -10, 0, 0, 2, 15, 5) fxAddTankFire(x, y, z, -10, 0, 0) Set all offsets to 0. And adjust them little by little. 1 unit is A LOT. (1.5/2 units is ~ the height of a ped) So use small steps like: 0.1 or 0.05 Rotating particles, I am not going to do that for you, because it takes me too much time for me to get it right. Sorry.
  25. DEBUG< I didn't add those lines for nothing.
×
×
  • Create New...