IIYAMA

Members
  • Content Count

    4,349
  • Joined

  • Last visited

  • Days Won

    29

IIYAMA last won the day on November 26

IIYAMA had the most liked content!

Community Reputation

465 Superstar

About IIYAMA

  • Rank
    Hawg
  • Birthday 01/01/2016

Details

  • Gang
    [HB]
  • Location
    Netherlands
  • Occupation
    I have never been to the streets of SA... so who knows?
  • Interests
    Design, scripting, UX/UI

Recent Profile Visitors

5,847 profile views
  1. IIYAMA

    Dx lines around the zones

    https://wiki.multitheftauto.com/wiki/DxDrawLine3D See example on that page.
  2. IIYAMA

    I need a little advice with metatables

    That really depends how you compare and use it. 1 on 1, sure it can be 30x faster. But aren't you comparing two different things? A function vs just an empty variable. If you take a look at dxDraw functions, it is obvious that they are being called every frame. Incompare to call getElementData there isn't much of a difference. The data is bound to the element, it is not like you have to search in all elementdata for it. Example: You use 60 dx functions each frame and 1 time a getElementData function. How much will we gain from optimize this function? The real danger of elementdata is in using it, without knowing what mechanisms are activated behind it, after it is SET.
  3. IIYAMA

    I need a little advice with metatables

    After you destroyed an element. A saved userdata reference will remain inside of the Lua memory. A userdata reference is not an element itself. It is a value that can be used to refer to an element in MTA. ------ It is like having a cat which you named `miauw`. After it died of old age, you can still refer to your precious cat by calling it's name. `miauw` I have dinner for you! (calling function: giveCatFoot(cat)) And then your grandma reminds you of the fact that it has already died... (warning: element does not exist) ------- That is sort of how userdata references work. See function isElement for userdata validation. isElement
  4. IIYAMA

    DX Render order

    Your problem has probably to do with rendering before MTA GUI and rendering after the MTA GUI. Make this option either enabled or disabled, for all functions: bool dxDrawText ( string text, float left, float top [, float right = left, float bottom = top, int color = white, float scaleXY = 1.0 [, float scaleY = 1.0 ], mixed font = "default", string alignX = "left", string alignY = "top", bool clip = false, bool wordBreak = false, bool postGUI = false, bool colorCoded = false, bool subPixelPositioning = false, float fRotation = 0.0, float fRotationCenterX = 0.0, float fRotationCenterY = 0.0 ] ) bool dxDrawRectangle ( float startX, float startY, float width, float height [, int color = white, bool postGUI = false, bool subPixelPositioning = false ] ) bool dxDrawLine ( int startX, int startY, int endX, int endY, int color [, float width = 1.0, bool postGUI = false ] ) bool dxDrawImage ( float posX, float posY, float width, float height, mixed image, [ float rotation = 0, float rotationCenterOffsetX = 0, float rotationCenterOffsetY = 0, int color = tocolor(255,255,255,255), bool postGUI = false ] ) Which can be find in most of the dxDraw functions you are using: https://wiki.multitheftauto.com/wiki/Client_Scripting_Functions#Drawing_functions
  5. IIYAMA

    outputChatBox

    outputChatBox("|SWAT| ["..Rank.."] #00ff00" .. getPlayerName ( source ) .. " #0000FF:#ffFFff " .. text, getRootElement(), 000, 128, 192, true ) First layer of paint RGB = RED, GREEN, BLUE Second layers of paint: #HEX Tool: http://www.javascripter.net/faq/rgbtohex.htm
  6. IIYAMA

    DX Render order

    It works, try it again. High/normal(first) = for window Low(later) = for text.
  7. IIYAMA

    DX Render order

    Sure: https://wiki.multitheftauto.com/wiki/AddEventHandler addEventHandler ( "onClientRender", root, functionName1, false, "high" ) -- do this first addEventHandler ( "onClientRender", root, functionName2, false, "normal" ) -- do this as default addEventHandler ( "onClientRender", root, functionName3, false, "low" ) -- do this last Optional Arguments getPropagated: A boolean representing whether the handler will be triggered if the event was propagated down or up the element tree (starting from the source), and not triggered directly on attachedTo (that is, handlers attached with this argument set to false will only be triggered if source == this). priority : A string representing the trigger order priority relative to other event handlers of the same name. Possible values are: "high" "normal" "low" It is also possible to add finer priority control by appending a positive or negative number to the priority string. For example (in priority order for reference): "high+4" "high" "high-1" "normal-6" "normal-7" "low+1" "low" "low-1" Important note: Anything bound to a specific element will be run before other handlers that are bound to something higher in the element tree (like root) This means that "high+10" bound to root won't trigger before "normal" bound directly to an element.
  8. IIYAMA

    Downloading screen

    If that is the case, then I think you picked the wrong project. Be realistic and do smaller projects first. @gujuk2 Instead of a loading bar, you can also display a loading image or loading text. Check this example: https://wiki.multitheftauto.com/wiki/IsTransferBoxActive It is used to detect if the transferbox(download bar) is active.
  9. IIYAMA

    Downloading screen

    -- serverside local resources = getResources () local resourceCount = #resources setElementData(resourceRoot, "resourceCount", resourceCount) -- clientside local resourceCount = getElementData(resourceRoot, "resourceCount") iprint("resourceCount:", resourceCount)
  10. IIYAMA

    Downloading screen

    [...] You can do that in the meta.xml. <download_priority_group>1<download_priority_group /> If not set, the download priority group for a resource defaults to 0. If this is set higher than 0, then the resource will be downloaded and started on the client earlier than other resources. If set to less than 0, the resource will be downloaded and started on the client later than other resources. https://wiki.multitheftauto.com/wiki/Meta.xml
  11. IIYAMA

    [HELP] Weapon Fire Shader

    I also tried that world texture once and for some unknown reason it doesn't work. A shader specialist might know.
  12. IIYAMA

    Hydra Rocket Damage

    Use this event instead: https://wiki.multitheftauto.com/wiki/OnClientExplosion
  13. IIYAMA

    DB Connection error

    It can be in another file but it has to be in the same resource. Making a connection just with a new + empty database will not solve your problem. Containers(tables) for the data have be generated before you can store or load data. If the connection function isn't in any of the files + there are no tables in the database, then it is recommended to consider it unfixable in case of not going to hire a paid scripter.
  14. IIYAMA

    Immortal Peds 0_0

    What about other players in the same server? What about you killing peds inside of a server that isn't yours? Did you modifi any mods or textures? Ask these kind of questions to yourself.
  15. IIYAMA

    Immortal Peds 0_0

    Can all peds not get killed? If that is the case, then this event is cancelled in one of your resources: https://wiki.multitheftauto.com/wiki/OnClientPedDamage