Jump to content

idarrr

Members
  • Posts

    133
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by idarrr

  1. Update: In guiCreateBrowser, I found that youtube video plays perfectly when I'm moving my cursor. But the video freeze and laggy when I stop moving my cursor. Can anyone confirm this or it's just me?
  2. Am I the only one facing this problem? I'm using dxCreateShader and engineApplyShaderToWorldTexture to draw youtube video on object. But the video is so laggy and barely moving. I set playback quality to small and still getting this lag. But when my character moving around (using w,a,s,d), the video is moving, not that laggy but still, unwatchable. I also test it on guiCreateBrowser and play youtube video, and the video is barely moving. I know its not my PC problem cuz i had 90fps and everyone also told me that video is laggy and unwatchable. I don't know if I miss something or its CEF problem, cuz I made this 3 months ago and it was fine until now.
  3. local cam = getCamera() local _, _, cz = getElementRotation(cam) local px, py, _ = getElementRotation(localPlayer) setElementRotation(localPlayer, px, py, cz)
  4. https://wiki.multitheftauto.com/wiki/DxDrawTextOnElement
  5. Maybe because you are using ALT + TAB and this will clear all render target. https://wiki.multitheftauto.com/wiki/OnClientRestore
  6. No, you can't use youtube URL to play a sound. There is an API to convert youtube url to mp3 file and you can play it. Or, you can create invisible browser and open youtube URL.
  7. Just convert MP4 video to WEBM
  8. I don't know what are you going to do with that. Is there any error coming out from debug? You know, 4th argument on setTimer is variable you wish to pass to SubenPasajeros function. And you should do this on SubenPasajeros function function SubenPasajeros (DispPasajeros) -- pass the variable here end
  9. It tooks only 10 seconds for me to find the answer on google. https://scriptinghelpers.org/questions/2725/difference-between-pairs-ipairs-and-next
  10. idarrr

    Server lag

    Probably the problem was on client side code, and mostly lag coming from render event, mods, and shader. You can check your client and server performance either using performancebrowser or ipb resource. Check this link: https://wiki.multitheftauto.com/wiki/Resource:Performancebrowser EDIT: btw, your image link is broken.
  11. idarrr

    sqlite COUNT

    That query should work and return zero as column COUNT(Account) Should be like this result[1]["COUNT(Account)"]
  12. This thing here if (randomQuestion) and (randomID) then else -- if code executed here, statement above return false end randownQuestion or randomID value may contain nil value
  13. When client download encoded file, you just need to read data from file and decode it and I dont think you need to modify the file at all. And use that buffer to apply texture or dff. See engineLoadDFF And also for dxDrawImage can be done using dxCreateTexture Basically: read file data using fileRead > decode data > apply texture or model using decoded data > close file I never try this, but I think it should work. Not sure about GUI image.
  14. idarrr

    [HELP]Trigger

    function showText(hedef,fiyat) local fiyat = getElementData(theVehicle, "fiyat") or 0 toBeShowed = toBeShowed.."Arac Fiyatı: "..fiyat.."\n" lines = lines + 1 end addEvent("oyuncuBilgisiDevam", true) addEventHandler("oyuncuBilgisiDevam", root, showText)
  15. What's the problem? And what is this? if (getElementData) >= 6 then
  16. I think the door position doesn't follow the ship object. If getNearest() used to find nearest object, maybe try something like this local attachedTo = getElementAttachedTo(doorObject) local x, y, z = getElementPosition(doorObject) if attachedTo then x, y, z = getElementPosition(attachedTo) -- and do some calculation about the offset position end
  17. Try to use ACL to restrict command /showchat. https://wiki.multitheftauto.com/wiki/Access_Control_List
  18. if ( getElementModel (p, localVehicle) == 411 ) then toggleControl (p, "handbrake", false) end -- 'p' is player, not element vehicle Try this: if ( getElementModel (getPedOccupiedVehicle(p), localVehicle) == 411 ) then toggleControl (getPedOccupiedVehicle(p), "handbrake", false) end
  19. onClientPlayerDamage won't trigger on server, you can use onPlayerDamage on server side code.
  20. As you can see, function setTeamFriendlyFire is server only function so it doesn't work on client.
  21. idarrr

    newResource

    addCommandHandler("refreshres",function(source) refreshResources(true) -- refresh the resource first, then loop local resources = getResources() for i,v in ipairs(resources) do if getResourceState(v) == "loaded" then end end outputChatBox("NewResource loaded: Here is the last resource(s) name which loaded. Not that resource which is already loaded", source, 255, 255,255,true) end)
  22. You want to move player position when they press lshift + w/a/s/d? You need to bind w/a/s/d key and check if lshift key is pressed. bindKey( "w", "down", function () if getKeyState( "lshift" ) == true then local px,py,pz=getElementPosition(localPlayer) setElementPosition(localPlayer, px+0.05, py, pz) end end ) -- and more... Also, adding X coordinate doesn't mean you can go forward (if you trying to make player go forward). You need to get player rotation and finding the +0.05 coordinate in front of player.
  23. This function may help you to improve text quality. dxSetBlendMode
  24. Actually, you can still see that blips on the map (F11) all the time even if you set the visible distance, but it won't show up on radar when it's out of range. If you are not sure about duplicated blips, you can just try: function seeAllBlips () for i, v in pairs(getElementsByType("blip")) do outputChatBox(inspect(i)) outputChatBox("Blip: "..inspect(v)) outputChatBox("Attached to: "..inspect(getElementAttachedTo(v)) end end addCommandHandler("blips", seeAllBlips) Debugging is important.
  25. I guess, its because you keep creating that blips when element streamed in. So you ended up having more than 1 blip attached to that vehicle I think. Why are you using onClientElementStreamIn may I ask? You can just set the visible distance on argument 8 (argument 9) so it doesn't show up on radar when it's too far away from you.
×
×
  • Create New...