• Announcements

    • jhxp

      Forums are online again after a maintenance.   18/03/17

      MTA Forums maintenance is completed, although some automatic time-heavy tasks are still in process and will be finished eventually in background. Expect some features such as Forum Search to not display all results until all processes are finished. Please let us know if you spot a forum feature that worked correctly before the maintenance but does not work anymore now. Thanks. --MTA Team
    • jhxp

      Multi Theft Auto: San Andreas 1.5.4 is out!   21/04/17

      Click the link in the announcement for more details.  


  • Content count

  • Joined

  • Last visited

Community Reputation

12 Decent


About MIKI785

  • Rank
  • Birthday 21/04/97


  • Location
    Dublin, Ireland

Recent Profile Visitors

431 profile views
  1. You should read this first:
  2. The ports aren't open,https://nightly.mtasa.com/ports/?d=
  3. Well, the scripts have errors in them, you should post that in the scripting section (https://forum.mtasa.com/forum/71-scripting/).
  4. You're missing the mta_mysql module, see here: https://wiki.multitheftauto.com/wiki/Modules/MTA-MySQL.
  5. Show us your Lua bit.
  6. Not true in this case as Lua is case sensitive. But you're right, in this case it actually doesn't make much sense to create a new function to call just one other function, just use 'anonymous' function by putting it straight into addEventHandler. addEventHandler("event", element, function () otherFunction(arg) end)
  7. screenX? Don't you mean screenX1? I guess that's because getScreenFromWorldPosition failed and returned false. Try this: function crosshair() local hitX,hitY,hitZ = getPedTargetEnd ( getLocalPlayer() ); local screenX1, screenY1 = getScreenFromWorldPosition ( hitX,hitY,hitZ ); if screenX1 then dxDrawImage(screenX1-(32/2), screenY1-(32/2), 32, 32, "files/crosshair.png") end end It might not draw it sometimes but maybe that's gonna happen for just a couple of frames and you might not see it, just try and see.
  8. The code is a mess but I guess the problem is that you're not updating stat8. Just move local stat8 = getPlayerStat (getLocalPlayer(),77) into the event handler before guiProgressBarSetProgress.
  9. You can create GUI in HTML using CEF, that is createBrowser/guiCreateBrowser. What do you mean by bind? You can interact with Lua part of your resource using javascript in the HTML page as explained here.
  10. You don't need a shader unless you want to draw the GUI on an element in the GTA world. If you just want it to float around then dxDrawMaterialLine3D is good enough. The material you would draw would be a render target created using dxCreateRenderTarget. Once you create the render target you can use that as a second screen (dxSetRenderTarget) to draw dx stuff on, after that's done you change it back to the actual screen using dxSetRenderTarget again. Do you understand or do you need an example? There are some examples on the wiki but I could write one as well if needed. The only thing is that I'm not sure how would the player interact with such GUI, I'm sure it's possible but it would require a lot of calculations and I don't think I would be able to do that.
  11. Even that won't work, https://wiki.multitheftauto.com/wiki/Game_Processing_Order. As you can see GUI (incl. chat) gets drawn near the end of the frame and there is no event being called after that happens.
  12. What do you mean? Is that a custom (created by mta) object? If so then the vehicle's lights wont reflect on it, if thats the problem. You'd have to use some shader for that to work.
  13. Just to make it clear, that wouldn't work, you're mixing server/client functions. You'd have to ask the server to kick you using triggerServerEvent, also if the player had a resolution of 640x480 (yes, small resolution like that is possible), it wouldn't work. Also, you mixed up your Xs and Ys, argh.. that code is just completely wrong
  14. How did you change the acl? Did you actually edit the file itself? if so, you have to use aclReload afterwards.
  15. Which one is line 313? Where is source and msg defined? Also use code tag next time.