idarrr
Members-
Posts
133 -
Joined
-
Last visited
-
Days Won
1
Everything posted by idarrr
-
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.
-
local cam = getCamera() local _, _, cz = getElementRotation(cam) local px, py, _ = getElementRotation(localPlayer) setElementRotation(localPlayer, px, py, cz)
-
https://wiki.multitheftauto.com/wiki/DxDrawTextOnElement
-
Maybe because you are using ALT + TAB and this will clear all render target. https://wiki.multitheftauto.com/wiki/OnClientRestore
-
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.
-
Just convert MP4 video to WEBM
-
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
-
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.
-
That query should work and return zero as column COUNT(Account) Should be like this result[1]["COUNT(Account)"]
-
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
-
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.
-
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)
-
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
- 4 replies
-
- attachelements
- position
-
(and 1 more)
Tagged with:
-
Try to use ACL to restrict command /showchat. https://wiki.multitheftauto.com/wiki/Access_Control_List
-
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
-
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)
-
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.
-
This function may help you to improve text quality. dxSetBlendMode
-
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.
-
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.