Jump to content

IIYAMA

Moderators
  • Posts

    6,089
  • Joined

  • Last visited

  • Days Won

    216

Everything posted by IIYAMA

  1. You can, by convert them to pixels and only using textures. https://wiki.multitheftauto.com/wiki/DxCreateTexture https://wiki.multitheftauto.com/wiki/DxGetTexturePixels https://wiki.multitheftauto.com/wiki/DxSetTexturePixels
  2. Your post didn't show up*, so you made another one. It is called slow internet.*
  3. Loading lots of mods/textures should be done with onClientRender(+getTickCount()). The engine will render a next frame when the process has been finished. The lagg will spread over a longer period of time and the amount of crashing should be reduced. onClientElementStreamIn should working too, but I do not recommend you to unload them when they got streamed out. Loading and unloading cost a lot of memory. You could try a combi with onClientElementStreamIn and onClientRender.
  4. What you can do is download the require files from another server. So you can speed up the download speed. Take a look at: MTA San Andreas 1.5\server\mods\deathmatch\mtaserver.conf
  5. This piece of code has nothing to do with your error.*
  6. Must have worked 1 of the 2 ways. The only thing you need is creativity and lua skills. There is another thing you can do if you can't get a long with getScreenFromWorldPosition and getWorldFromScreenPosition. By scripting an overwrite. Zooming in mta works with steps, there are an amount of steps you can zoom in/zoom out. bindKey -- "zoom_in" "zoom_out" > function -- create a variable which contains the zoom status. setControlState ( "zoom_in", true) -- zoom in setControlState ( "zoom_in", false) -- increase variable zoom status setControlState ("zoom_out", true) -- zoom out setControlState ("zoom_out", false) -- de-increase variable zoom status toggleControl -- "zoom_in" "zoom_out" > false -- onClientPreRender -- check if aiming with sniper else reset the variable zoom status. I have made it like this before (an overwrite of zooming with sniper), so I can guaranty it will work.
  7. There might be a way. (probably inaccurate) Using: getScreenFromWorldPosition getWorldFromScreenPosition Since you can convert pixels > units and units > pixels using those functions. When you zoom in, you can see less units than when you zoom out. Etc. Also it might be possible with only getWorldFromScreenPosition, if this returns a correct position. Then you can compare it with getPedTargetStart.
  8. Why are the .so files in the /x64 direction, of a 64 bit mta server? (core.so / net.so / xmll.so) Must I keep the: core.so / net.so / xmll.so in that folder? Or move it up like the 32 bit server? Very nice! I love it!
  9. No, I can only fix your script or learn you how to do it, not writing it for you.
  10. That is obvious, you aren't setting elementdata with in the function addPlayerZombieKills from line 12 t/m 18.
  11. outputChatBox('|...........Do Not Change Script............|', getRootElement(), 0, 0, 0, true) outputChatBox('|..................Eminem Created This....................|', getRootElement(), 0, 0, 0, true)
  12. Png-8 can be selected when you use the save for web methode. Png-8 is smaller, but is terible with alpha blending. Your game did also freeze using the onClientRender methode? Well you solved it, but I am still kinda interested.
  13. There are no functions for that, unless you make the F11 map yourself.
  14. Maybe your textures are too heavy? Try to save with "dxt5", dxt3 is an older version of dxt5. Still now chances? > Save large png's without alpha changes/levels, with png-8. And I strongly recommend to load a lot of textures with "onClientRender" in combination with getTickCount(). Because somehow the next frame has to wait before the function has been fully executed. This is an old bug from the gta san core. Example: local index = 1 local nextTextureLoadTime = 0 function loadingTexture () local timeNow = getTickCount() if timeNow > nextTextureLoadTime then nextTextureLoadTime = timeNow+30 local objects = zoneTable.objectsPositions local v = objects[index] if v then -- put your code here -- ------------------------ index = index+1 else removeEventHandler("onClientRender",root,loadingTexture) end end end addEventHandler("onClientRender",root,loadingTexture) So some slow pc's can now gets up with the replacement process and won't crash so fast.
  15. IIYAMA

    Crosshair bug

    It is stupid, because the code I posted doesn't show any debug text, but 3D lines. It seems you didn't even looked at it, you are wasting my time.
  16. That is more than logic, to keep everything save. But you can copy the file to another resource. (or just temporary)
  17. You mean, people are applying their own mods? You should use https://wiki.multitheftauto.com/wiki/DownloadFile instead of triggerLatentClientEvent. To let the system check if the file is validated. If you use triggerLatentClientEvent you can check if the filesize has chanced, but you won't be able to check the timestamp of the creation/edit time. Only mta can do that, so it a risk.
  18. Encrypting mods? Well against the ordinary stealer: https://wiki.multitheftauto.com/wiki/Base64Encode https://wiki.multitheftauto.com/wiki/Base64Decode or/But I recommend:(because of the custom key) https://wiki.multitheftauto.com/wiki/TeaEncode https://wiki.multitheftauto.com/wiki/TeaDecode or Make your own... What do you need: https://wiki.multitheftauto.com/wiki/FileExists -- Check if the file exist. https://wiki.multitheftauto.com/wiki/FileOpen -- Open the file https://wiki.multitheftauto.com/wiki/FileGetSize -- Read the file -- Decode the text/string/data of the file. https://wiki.multitheftauto.com/wiki/FileWrite -- Write the new decoded file (it is only temporary) -- Load txd or dff https://wiki.multitheftauto.com/wiki/FileDelete -- Delete the file. Yet pro's will be able to steal them.
  19. IIYAMA

    Crosshair bug

    Stupid answer, bye.
  20. This is not a place for requesting. Go read the forum rules. This section is only for scription support and other kind support related to that. Have a nice day.
  21. IIYAMA

    Crosshair bug

    Blue, I just gave you code to debug your code. What is the result?
  22. IIYAMA

    Crosshair bug

    Why don't you take a look of what really happens? If you don't know how your code behaves, you will have a hard time fixing it... addEventHandler("onClientRender", getRootElement(), function ( ) if isPedInVehicle(localPlayer) then if getElementModel( getPedOccupiedVehicle(localPlayer) ) == 520 then local veh = getPedOccupiedVehicle(localPlayer) local col2 = getElementData(veh, "r.col2") local col1 = getElementData(veh, "r.col1") if not isElement(col2) or not isElement(col1) then return end local x, y, z = getElementPosition(col2) local x1, y1, z1 = getElementPosition(col1) -- dxDrawLine3D(x, y, z,x1, y1, z1,tocolor(255, 0, 0)) -- debug line 1 -- z1 = z1+getElementDistanceFromCentreOfMassToBaseOfModel(veh)*2 -- dxDrawLine3D(x, y, z,x1, y1, z1,tocolor(0, 0, 255)) -- debug line 2 -- local hit, x2, y2, z2 = processLineOfSight(x, y, z, x1, y1, z1) if not(x2) or not(y2) or not(z2) then x2, y2, z2 = x, y, z end -- dxDrawLine3D( x1, y1, z1,x2, y2, z2,tocolor(0, 255, 0)) -- debug line 3 -- local sx, sy = getScreenFromWorldPosition(x2, y2, z2) if not(sx) or not(sy) then return end dxDrawLine(sx, sy-12.9, sx, sy+12.9, tocolor(0, 255, 0), 2) dxDrawLine(sx-12.9, sy, sx+12.9, sy, tocolor(0, 255, 0), 2) end end end )
  23. np. I wasn't sure if it would do what you wanted, but it seems it did.
  24. Try something like this: function controlObject() if not objectInEditor then return end local camera = getCamera () local cameraX,cameraY,cameraZ = getElementPosition(camera) local objectX,objectY,objectZ = getElementPosition(objectInEditor) local x,y,z if pressedButton == "num_8" then x,y,z = getMatrixForward(camera,0,moveSpeed,0) elseif pressedButton == "num_2" then x,y,z = getPositionFromElementOffset(camera,0,0-moveSpeed,0) elseif pressedButton == "num_4" then x,y,z = getPositionFromElementOffset(camera,moveSpeed,0,0) elseif pressedButton == "num_6" then x,y,z = getPositionFromElementOffset(camera,0-moveSpeed,0,0) elseif pressedButton == "pgup" then x,y,z = getPositionFromElementOffset(camera,0,0, moveSpeed) elseif pressedButton == "pgdn" then x,y,z = getPositionFromElementOffset(camera,0,0, 0-moveSpeed) end if x then setElementPosition(objectInEditor, objectX+(x-cameraX),objectY+(y-cameraY),objectZ+(z-cameraZ)) end end addEventHandler("onClientRender", root, controlObject) I haven't build something like this before, so I have no idea how to script this perfect.
×
×
  • Create New...