Jump to content

DarkStalker30

Members
  • Posts

    40
  • Joined

  • Last visited

  • Days Won

    1

DarkStalker30 last won the day on April 6 2025

DarkStalker30 had the most liked content!

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

DarkStalker30's Achievements

Rat

Rat (9/54)

8

Reputation

  1. Problem solved. I don't know why, but when I used VPN it doesn't works, even with white-list exceptions for VPN. I deleted it from my white-list and added again, and it works now.
  2. Hello everyone. I didn't connect to my local server about six months, and decided to do that. But I got a problem - CD20. "Failed to connect to IP port 22005 after 10 ms". I started looking, and noticed, that "open ports" is looking that all my ports are closed. But in power shell they are open. UDP 192.168.1.75:22003 *:* 18488 TCP 0.0.0.0:22005 0.0.0.0:0 LISTENING 18488 MTA Server.exe 18488 Console 1 34?872 ?? Loopback is working: Computer Name : 127.0.0.1 Remote Address : 127.0.0.1 Remote Port : 22005 Interface Alias : Loopback Pseudo-Interface 1 Source Address : 127.0.0.1 In configs IP is auto. I can see server in browser in local network. I'm already updated my MTA. I deleted all and installed again. Problem is still here. What's wrong? I can't send a log, forum is prohibiting it for me. How can I apply it?
  3. Problem solved. In line: loadBrowserURL(browser, "http://mta/local/"..getResourceName().."/index.html") "mta/local" is already resource folder, so correct way to use it: loadBrowserURL(browser, "http://mta/local/index.html")
  4. Hi, people. I'm trying to create simple local browser for interface, but I only get a white screen. My code (took it from wiki page): local browserGUI = guiCreateBrowser(300, 300, 700, 700, true, false, false) local browser = guiGetBrowser(browserGUI) addEventHandler("onClientBrowserCreated", browser, function() outputChatBox("Browser start") loadBrowserURL(browser, "http://mta/local/"..getResourceName().."/index.html") end) addEventHandler("onClientBrowserDocumentReady", browser, function(url) outputChatBox("Page loaded: " .. url) end) addEventHandler("onClientBrowserLoadingFailed", browser, function(url, errorCode, errorDescription) outputChatBox("Load error: " .. errorCode .. " (" .. errorDescription .. ")") end) No errors, page load succesfull. HTML - simple. <html><body>Test</body></html> What I need to do?
  5. I found another way. On start interface resource add and instant remove armor to localPlayer, it's turning on armor bar, then taking health bar coords, armorY + (healthY - armorY) / 2 = breathY. And it's working perfect. UPDATE: for correct working of this method you need to let armor bar to be drawn for 1 frame at least. I used a timer, which checking armorX and armorY, until they became not 0, 0.
  6. That's something that I want to do. And if breath bar has its coords, then all ok. But if not, then stamina bar going to left top corner. I just can't upload images. If character will be in water while player has black screen by fadeCamera() and HUD off, will it trigger breath bar?
  7. Hi guys. In 1.6 was added some new functions for HUD. I liked the idea to use it to draw my stamina bar in place, where is breath bar by default. But then I got a problem - until the player gets into the water, breath bar x, y = 0, 0. Is there a way to force draw that bar without going into water?
  8. Okay then, thanks a lot! I will try it later
  9. Well, looks like it can be changed with timer too smooth transition. But it will take time to figure this out. If really, I don't understand how can I freeze lighting. Timer with setSkyGradient()? SetWorldProperty() looks interesting, but many works to do as well. I guess, for now I leave it, because my server on early stage of development. So if I can to do it simple and hacky way - I will do it, if not - then leave it.
  10. Hi guys, didn't write some time, but now want to return. I have an idea to use different weather on the map, because as you know in single SA different regions have different weather. I find a way to do it - when player changing region (prototype for now, in future will do collision cubes) start setWeatherBlended() and then accelerate game time with setMinuteDuration(), after it return time to the server. But it has problem, because with fast time you will get fast day and night. If in some border time like between 20:00 and 22:00 you can even didn't notice it, then at another time it's too obvious. Is there a way to freeze lighting to create illusion of not changing time?
  11. Well, I tried to use it, but GPT very stupid in code, really. And stupid by itself. You probably don't want to use it for real code, only for ideas or simple monkey job. And it's loving to invent new functions in standard MTA, so you need to check it on wiki or in IDE with code highlighting. I guess it's because on MTA not so many free code in network. Maybe new versions will can do it better, but not now.
  12. You can save your coordinates to the variables, and the use them to build text. Like: local rectangleStartX = x*1200 local rectangleWidth = x*1400 dxDrawText(rectangleStartX + rectangleWidth + 10, etc...) But i'm not sure right now about your coordinates, because "width" for dxDrawRectangle - it's not the endpoint, if wiki is right And then code will be more easy, because for width you can use just "200". As for take coordinates from rectangle - well, looks like it can't be done in MTA. P.S. I'm not good in UI scripting, just trying to help with simple logic.
  13. Solution: local shader = dxCreateShader("texture.fx", 0, 0, false, "ped") Thanks @IIYAMA for help!
  14. "*" applies shader to all textures. And I already tried this, found name of texture in skin page and wrote it. Didn't work.
  15. Hello everyone, I'm trying to work with shaders. For now it just simple texture replace, but I can't apply it on local player. Other textures change OK. texture.fx code (simplest): texture myTexture; technique ClothesShader { pass P0 { Texture[0] = myTexture; } } Client code: local shader = dxCreateShader("texture.fx") local texturesTable = { [1] = dxCreateTexture("1.png"), [2] = dxCreateTexture("2.png"), [3] = dxCreateTexture("3.png") } addCommandHandler("testclothe", function(_, variant) variant = tonumber(variant) if variant > 0 and variant < 4 then dxSetShaderValue(shader, "myTexture", texturesTable[variant]) engineApplyShaderToWorldTexture(shader, "*", localPlayer) end end) No any errors, all files added in meta.xml. As I said before, this code can apply shader to all textures, if delete "localPlayer" from arguments, but it can't apply on player, and I can't understand, why. I readed on wiki "engineApplyShaderToWorldTexture", and saw the recommend of using argument "elementTypes" as "ped" or "all", but if it's the problem, then I don't know, what to put in other arguments (and I think that default value of this argument include "all"). If need, can add screenshots, but it only duplicates that text message.
×
×
  • Create New...