Jump to content

FileEX

Helpers
  • Posts

    56
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by FileEX

  1. If you set images downloading to false, the files will not be downloaded for the client, and the scripts that use these images, e.g. for the GUI, will stop working properly due to the lack of files. If you don't want to save the images to the client's disk, you can keep them on the server and send only the raw data to the client and use it to create a texture for drawing the GUI. You can also consider using SVG, which allows you to easily create images from string data without having to download .svg files to disk
  2. When it comes to fixed lines, yes, you simply need to modify the recorded line by adding effects, e.g. in Audacity. When it comes to voice chat, there are special programs/modulators for it. As for the script, I'm not sure. You can try this https://wiki.multitheftauto.com/wiki/SetSoundEffectParameter and this https://wiki.multitheftauto.com/wiki/SetSoundEffectEnabled
  3. Server-side scripts are not downloaded by players, so setting the cache does not change anything. Setting the cache means that the script is not downloaded to the player's disk, but is still loaded into memory so that it can run. It can still be manipulated by the client, so you should never trust data from the client. More about it here https://wiki.multitheftauto.com/wiki/Script_security
  4. Change resourceRoot to root in the loginAccount event on server-side
  5. I don't think you can disable the horizontal scrollbar. You can force it to show, but you can't hide it. The width of the gridlist columns cannot exceed 0.95, then the horizontal scrollbar will not appear.
  6. Proszę local screenX, screenY = guiGetScreenSize(); local barW,barH = (108/1080) * screenY, (25/1080) * screenY; local barX,barY = screenX / 2 - barW / 2, screenY * 0.8; local ballX,ballY; local ballSize = (17/1080) * screenY; local ballCenterX = barX + barW / 2 - ballSize / 2; local ballY = barY + barH / 2 - ballSize / 2; local bar = dxCreateTexture("pasek.png"); local ball = dxCreateTexture("kulka.png"); addEventHandler('onClientRender', root, function() local veh = getPedOccupiedVehicle(localPlayer); if (veh and getVehicleType(veh) == 'Plane') then local _,ry = getElementRotation(veh); ry = ry % 360; local offset = 0; if (ry <= 90) then offset = ry; elseif (ry <= 180) then offset = (180 - ry); elseif (ry <= 270) then offset = -(ry - 180); else offset = -(360 - ry); end ballX = math.max(barX, math.min(barX + barW - ballSize, barX + barW / 2 + (offset/90) * (barW / 2) - ballSize / 2)); dxDrawImage(barX, barY, barW, barH, bar, 0, 0, 0, 0xFFFFFFFF); dxDrawImage(ballX, ballY, ballSize, ballSize, ball, 0, 0, 0, 0xFFFFFFFF); end end); Musisz sobie jedynie dopasować pozycje w osi Y oraz zmienić X do swojego paska. Ja obciąłem grafikę paska aby nie miała pustego tła wokół https://imgur.com/M0F1zdp
  7. I can't help you because I don't know this gamemode or the "D modu" or "turf" resource
  8. Aby móc poprawnie pozycjonować kulkę, ten biały pasek powinien być osobną grafiką https://imgur.com/xMErJtY Wyślij jak możesz grafikę tego paska oraz kulki jako osobne grafiki. Reszty zegara nie potrzebuję
  9. Skoro przeglądarka przetłumaczyła tekst na polski to domyślam się, że jesteś Polakiem (tak jak i ja), a zatem odpowiem po polsku. Rozumiem, że chcesz aby kulka przesuwała się w lewo lub prawo w zależności od nachylenia się samolotu. Możemy obliczać położenie kulki na podstawie rotacji samolotu. Utwórzmy offset, który będzie dodawany/odejmowany do aktualnej pozycji piłeczki i będzie on 100% w przypadku maksymalnego wychylenia. local ballX, ballY = -- pozycja kulki na środku paska local offset local maxAngle = 90 -- maksymalne wychylenie przy którym kulka będzie na końcu paska -- pobieramy rotację samolotu local rx,ry,rz = getElementRotation(plane) -- nie wiem teraz z pamięci która oś odpowiada za przechył na boki, więc zakładam, że X if (rx < 0) then -- przechylenie w lewo offset = -(szerokoscPaska / 2 + rozmiarKulki/ 2) elseif (rx > 0) then offset = szerokoscPaska / 2 + rozmiarKulki end offset = offset * (math.abs(rx) / maxAngle) Coś w ten sposób mniej więcej i teraz do kulki po prostu dodajesz ten offset. Zakładam, że offset to po prostu połowa paska bo kulka jest na jego środku. Do pełni szczęścia musisz jeszcze zrobic to samo dla osi Y.
  10. I do not understand what's going on. What exactly is the problem now? Something isn't working or is there an error? These code snippets say nothing about the problem
  11. Opis jest trochę nie jasny, tak samo jak zdjęcia. Na czym dokładnie polega problem? Czym jest ta "piłka"? PS: Jeśli piszesz po polsku to zakładaj temat w polskim dziale.
  12. addEventHandler("TurfSistem:onPlayerEnterTurf",root,function(id) addEventHandler("onPlayerCommand",source,komutEngel) setElementData(source,"Turf",tostring(id)) toggleControl(source,"vehicle_fire",false) toggleControl(source,"vehicle_secondary_fire",false) toggleControl(source,"ozellik1",false) addEventHandler(source, ozellik1, D_Modu, false) -- Remove this end) addEventHandler("TurfSistem:onPlayerExitTurf",root,function(id) removeEventHandler("onPlayerCommand",source,komutEngel) setElementData(source,"Turf",nil) toggleControl(source,"vehicle_fire",true) toggleControl(source,"vehicle_secondary_fire",true) toggleControl(source,"ozellik1",true) addEventHandler(source, ozellik1, D_Modu, true) -- Remove this end) From this code, simply remove these lines with addEventHandler. They are wrong and are not needed anywhere from what I see
  13. So your source is the player. For addEventHandler the first argument is the event name, but you use the source (player which entering into the colshape)
  14. Show the code where the TurfSistem:onPlayerEnterTurf and TurfSistem:onPlayerExitTurf events are triggered
  15. It is possible, but then you have to make your own parser for such map files.
  16. FileEX

    Error Dbquery

    Show your code from "rp_mysql" resource
  17. If you don't want the files to be saved on the players disk, set the cache to false in meta.xml. <script src="client.lua" type="client" cache="false" />
  18. You need to make loop with getElementsByType for the blips and display them. Remember to make appropriate calculations as with player blips
  19. You can do the loading of the vehicles.ide file as done at Handling Loader by fileOpen, fileRead functioons
  20. There is no property called "Rotated" in CEGUI. The properties related to rotation are: "Rotation" or "XRotation", "YRotation", "ZRotation". Try using one of them http://static.cegui.org.uk/static/WindowsLookProperties.html#StaticImage
  21. Just use negative height and rectangle will be rendered from bottom to top
  22. You will need it: dxDrawMaterialLine3D - For display image/icon in 3D space getPedBonePosition - For get the player head position onClientRender - For rendering material line 3D getTickCount - For count visibility time for the material line isPedInVehicle onClientMarkerHit You can also use getScreenFromWorldPosition with dxDrawImage instead of material line 3D but the final effect will be less neat.
  23. Try getWorldFromScreenPosition to get the world position from the crosshair 2D position
  24. FileEX

    settime

    If this is client side code you should make something like this outputChatBox("#F70000[Info] #FFFFFFThe time has been set to #96FF2714:00 #FFFFFFby a #0093FF"..getPlayerName(localPlayer), 247, 0, 0, true) This message will be shown only for the player which use command "moon", not for everyone. If you want show this message and set time to the same value for everyone player your should make it on server side.
  25. I have this code, but it is not endless. It comes to the end of the graphics and jumps to the beginning, it's not the effect I wanted to get local x = 0 local ecgSpeed = 1; addEventHandler('onClientRender', root, function() x = x - ecgSpeed if (x <= -388) then x = 0; end dxDrawImageSection(pulseX, pulseY, pulseW, pulseH, x, 0, 388, 77, pulse) end);
×
×
  • Create New...