• Content count

  • Joined

  • Last visited

  • Days Won


IIYAMA last won the day on October 31

IIYAMA had the most liked content!

Community Reputation

220 Celebrity


  • Rank
  • Birthday 01/01/16


  • Gang
  • Location

Recent Profile Visitors

2,440 profile views
  1. [Help]Panel open command

    The element has to exist first before you can have interaction with it. Real world example: How can I help people on this forum, if they haven't been born yet? The answer to that is: I can not. So use: if isElement(aWarpForm) then Before you are going to have interaction with this element.
  2. [HELP] Why not working color change?

    You aren't executing the function `szinvaltas`. And I have also no clue why you put a function there. Also I do not understand where the variable `speed`/ speed value comes from.
  3. [HELP] Why not working this script?

    That is not the error/warning. But this: c.lua:5: attempt to concatenate local 'amount' (a nil value) Which makes the meaning of the issue very different. local screenW, screenH = guiGetScreenSize() local amount function asdasd() dxDrawRectangle(screenW * 0.8069, screenH * 0.5656, screenW * 0.1931, screenH * 0.0289, tocolor(0, 0, 0, 178), false) dxDrawText("Kaptál #01AC41"..amount.."Ft-ot.", screenW * 0.8063, screenH * 0.5656, screenW * 1.0000, screenH * 0.5944, tocolor(255, 255, 255, 255), 1.00, "sans", "center", "center", false, false, false, true, false) end addEvent("theclienteventname", true ) addEventHandler("theclienteventname", root, function ( amount_ ) amount = amount_ addEventHandler("onClientRender", root, asdasd) end)
  4. fetchRemote download progess?

    You can use fetchRemote to make a 'download' progress, but more in this way: fileSize / totalFileSize * 100 = additional progress.(% after a file has been downloaded) Which is more or less a file transfer progress instead of a download progress. With a transition you can make it more smooth. But it will not tell the client that a part of a file has been downloaded. See also the function downloadFile which also validate the file if it has been corrected downloaded and not edited by the client.
  5. fetchRemote download progess?

    I don't think there is a download progress indication for fetchremote. But you can use the trigger latent functions to show the client download progress once the server has downloaded the files.
  6. Reloading animations

    Nice done mate. Now get serious please. https://wiki.multitheftauto.com/wiki/Client_Scripting_Functions https://wiki.multitheftauto.com/wiki/Client_Scripting_Events https://wiki.multitheftauto.com/wiki/Server_Scripting_Functions https://wiki.multitheftauto.com/wiki/Server_Scripting_Events
  7. Reloading animations

    After you did some serious research and collecting the parts you need. I am not creating medium examples, if I am not sure if you will learn something of it. That are my rules.
  8. Reloading animations

    You can't give weapons reload animations with setWeaponProperty because they simply do not exist(for some weapons) in GTA by default. An overwrite is required. (with setPedAnimation etc.)
  9. Testing interpolate

    local hover = false; showCursor(true); function dxDraw() dxDrawRectangle(567, 263, 229, 236, tocolor(0, 0, 0, 206), false); local move -- keep move local if isMouseInPosition(567, 263, 229, 236) then if not hover then start = getTickCount() iprint("state has been changed! (1)") hover = true end move = interpolateBetween(0, 0, 0, 236, 0, 0, ((getTickCount()-start)/500), "Linear"); else if hover then start = getTickCount() iprint("state has been changed! (2)") hover = false end move = interpolateBetween(0, 0, 236, 0, 0, 0, ((getTickCount()-start)/500), "Linear"); end dxDrawRectangle(567, 263, 229, move, tocolor(189, 131, 131, 206), false); end addEventHandler("onClientRender", getRootElement(), dxDraw) function isMouseInPosition ( x, y, width, height ) if ( not isCursorShowing( ) ) then return false end local sx, sy = guiGetScreenSize ( ) local cx, cy = getCursorPosition ( ) local cx, cy = ( cx * sx ), ( cy * sy ) if ( cx >= x and cx <= x + width ) and ( cy >= y and cy <= y + height ) then return true else return false end end That's because you only need to update the start tickCount when you change state. And not when you your state is true or false. Please check the debug console.
  10. Testing interpolate

    local begin = ( ( getTickCount() - start ) % 500 / 500 ); This will repeat the animation. It is not what you want.(so don't apply it in your end code) But it might tell you what you are doing wrong with the timing. What you need to do is using a boolean to set a status. This status indicates when you switch between hovering and not hovering. local hovering = false if not hovering then start = getTickCount() hovering = true end if hovering then start = getTickCount() hovering = false end The code will rest the timing, when you switch states. I leave the applying of the code to you.
  11. triggerServerEvent

    By defining the resourceRoot as source element and attach it at the other side with the resourceRoot as well. Client triggerServerEvent("event", resourceRoot) theElement: The element that is the source of the event. Server addEvent("event", true) addEventHandler("event", resourceRoot, attachedTo: The element you wish to attach the handler to. The handler will only be called when the event it is attached to is triggered for this element, or one of its children. Often, this can be the root element (meaning the handler will be called when the event is triggered for any element). https://wiki.multitheftauto.com/wiki/AddEventHandler The source element is LINKED to the attachedTo element. The attachedTo element will only accept the same element or the children of that same element. The triggerEventSystem is a global system and the events will always be global accessible. You have to do this for every resource that uses the same event name. The root element will accepts everything, included resourceRoot's.
  12. [Question]How to set clients weather

    addEventHandler("onClientGUIClick",weather_button,setCustomWeather) function setCustomWeather(button,state) --Function to change weather You can't use the same name for the function `setWeather`, because it will actually overwrite it. Which means that if you call setWeather on line 42, it will re-call the function setWeather of line 38 (and not the mta function).
  13. [Help]Panel open command

    Attach the addCommandHandler to a function. Not the GUI element `aWarpForm`. I will take a closer look at it, once you debug your code.
  14. How to make that script?

    Use the camera object. https://wiki.multitheftauto.com/wiki/GetCamera local camera = getCamera() bindKey( "w", "down", function () if getKeyState( "lshift" ) == true then -- position is already included in the matrix local x,y,z = getPositionFromElementOffset(camera, 0, 3, 0) setElementPosition(localPlayer, x, y, z) end end )
  15. Bad Quality RenderTarget