Jump to content

IIYAMA

Moderators
  • Posts

    6,063
  • Joined

  • Last visited

  • Days Won

    209

Everything posted by IIYAMA

  1. hex code is counted as characters, even if the last argument is true.
  2. IIYAMA

    help

    https://wiki.multitheftauto.com/wiki/AddEventHandler Read wiki mta, pfff
  3. Not really precisely, cause you only check the amount of fps from one pre-frame, not from a second. But the good thing about it, that it shows us direct big fps drops, I tried that part of you. It jumps from 66 t/m 56, my fps is stable and it makes changes with 10 fps. but it detect big fps drops directly:(I tried this) local updateTick,lastFPSUpdate = 0,0 addEventHandler ("onClientPreRender", root, function (dt) local fps = math.floor ( 1000 / dt ) if lastFPSUpdate-fps > 30 and (not updateTick or getTickCount () - updateTick > 500) then updateTick = getTickCount () outputChatBox("big fps drop") end lastFPSUpdate = fps end) @abxf, local counter = 0 local starttick local fps =0 addEventHandler("onClientRender",root, function() if not starttick then starttick = getTickCount() end counter = counter+1 if getTickCount() - starttick >= 1000 then fps = counter starttick,counter = false,0 end dxDrawText(""..fps.."", 898, 689, 1018, 736, tocolor(0, 255, 0, 255), 1.00, "default", "left", "top", false, false, true, false, false) end )
  4. IIYAMA

    dx Text Help

    https://wiki.multitheftauto.com/wiki/BindKey https://forum.multitheftauto.com/viewtopic.php?f=91&t=62901 You already have an answer on that question.
  5. It isn't, more handlers give more lagg. onClientRender is just fine, you don't need to calculate so much, for so little improvements with the correct timing. But it is nice that there is another way of doing.
  6. IIYAMA

    ACL usage

    Then you simply don't have rights for that, the server will ignore it and that will be visible in the debug.
  7. https://wiki.multitheftauto.com/wiki/Dx ... rialLine3D
  8. ah yes thank you, thank you, thank you I thought tocolor would convert also to hex numbers so I only had to add #.
  9. IIYAMA

    I Need Help !!

    why would you add more localPlayer? the source will be the player.
  10. One of the last things I have to learn is working with strings, I still hate that part because I always make a lot of mistakes with it. local defaultColour = tocolor(255,255,255) outputChatBox(tostring("#" .. defaultColour) .. "hoi",255,255,255,true) I have simply no idea what is wrong. My brain is a little bit roasted, (it feels like that) result :
  11. ah yes, you are right. But I have 1000+ fonts and most of them are otf.(I am studying for graphical designer) letters are ugly.... Pity
  12. it is an OpenType-Lettertypefile Can't mta send every file?
  13. http://img18.imageshack.us/img18/5720/zgn0.png meta.xml <file src="MrsEavesOT-Bold.otf"/> lua file addEventHandler("onClientResourceStart",resourceRoot, function () font = dxCreateFont( "MrsEavesOT-Bold.otf") end)
  14. WTF??????????? what did you just did.
  15. addEventHandler ("onVehicleEnter", root, function ( ) setVehicleColor ( source, 255 ,255 ,255, 255 ,255 ,255, 255 ,255 ,255, 255 ,255 ,255 ) end)
  16. http://img109.imageshack.us/img109/2475/ai1n.png Last icon you can click on in the menu named as "test", then you got this window, >basic test, full test and cancel.
  17. Try this, the race resource may change the colour after spawning, but I am not sure about that. addEventHandler ("onVehicleEnter", root, function ( ) local r2,g2,b2 = getVehicleColor ( source) if r2 ~= 255 or g2 ~= 255 or b2 ~= 255 then setVehicleColor ( source, 255 ,255 ,255 ) end end) Updated
  18. may I ask, what will getVehicleType return? instead of "Automobile"
  19. Question: must all vehicles have white colours after the script starts? to be honest I don't know what you want to make. Is this what you want to make? addEventHandler ("onClientResourceStart", resourceRoot, function ( ) local r, g, b,vehicles = 255, 255, 255,getElementsByType( "vehicle") for i=1,#vehicles do local vehicle = vehicles[i] local r2,g2,b2 = getVehicleColor ( vehicle ) if r2 ~= r or g2 ~= g or b2 ~= b then setVehicleColor ( vehicle, 255 ,255 ,255 ) end end end)
  20. addEventHandler ("onClientResourceStart", resourceRoot, car )
  21. That is just normal is test mode, when you do full test it is resolved.
×
×
  • Create New...