Dzsozi (h03)

Members
  • Content count

    540
  • Joined

  • Last visited

  • Days Won

    1

Dzsozi (h03) last won the day on December 25 2017

Dzsozi (h03) had the most liked content!

Community Reputation

46 Good

7 Followers

About Dzsozi (h03)

  • Rank
    Playa Partner

Details

  • Location
    Hungary

Recent Profile Visitors

2,014 profile views
  1. Fall off bike fix

    https://community.multitheftauto.com/index.php?p=resources&s=details&id=12903 This may help you out with the rotations.
  2. dxGetTextWidth and text positioning problem

    It works, thank you so much! I didn't even think about this kind of solution. Thanks again!
  3. Hello! I would like to make dxDrawTexts draw after each other with a little offset between them, like a horizontal menu thing. But I keep failing, I have been trying to solve this for hours now but I can't get the result I want. What am I doing wrong? local defaultButtonColor = tocolor(180,180,180,255) local normal = dxCreateFont("files/fonts/normal.ttf", 24, true, "antialiased") local buttonSize = 0.5 local marginOffset = 10 local menuButtons = { {"SADSADASWQETSADASG", defaultButtonColor, hover = false}, {"QRWRQW", defaultButtonColor, hover = false}, {"GDADSSASDFSASD", defaultButtonColor, hover = false}, {"FHDJRSDAD", defaultButtonColor, hover = false}, } function draw() for i=1, #menuButtons do if menuButtons[i] then local menuButtonTextWidth = dxGetTextWidth(menuButtons[i][1], buttonSize, normal) local menuButtonTextHeight = dxGetRealFontHeight(normal) local step = 50 + ((i - 1) * (menuButtonTextWidth + marginOffset)) -- problem is probably here somewhere, I guess dxDrawText(menuButtons[i][1], step, 400, 0, 0, menuButtons[i].hover and tocolor(255,255,255,255) or menuButtons[i][2], buttonSize, normal, "left", "top", false, false) end end end addEventHandler("onClientRender", root, draw) For some reason, this is the result I get: And this is what I would like to have: What is the problem, how should I do it?
  4. No Vehicle Taillights

    Check the modded vehicle's txd file if it has any light textures and replace them as well.
  5. No Vehicle Taillights

    addEventHandler("onClientResourceStart", resourceRoot, function() local shader1 = dxCreateShader("texreplace.fx") local lightsoff = dxCreateTexture("vehiclelights128.png") engineApplyShaderToWorldTexture(shader1,"vehiclelights128") dxSetShaderValue(shader1, "gTexture", lightsoff) local shader2 = dxCreateShader("texreplace.fx") local lightson = dxCreateTexture("vehiclelightson128.png") engineApplyShaderToWorldTexture(shader2,"vehiclelightson128") dxSetShaderValue(shader2, "gTexture", lightson) end) Try this and make sure that the paths for the textures in the script are correct. Also, did you add the textures in the meta file? What does the debugscript say?
  6. [SHOW] Vehicle Reverse Light System

    Hello! Today I am bringing you a new part/update of the Advanced Vehicle System project I am currently working on. This part of the project contains a simple, yet nice and effective reverse light system. It is not fully finished yet, still need some improvements and features, but I managed to get it done "partially", so I can show it to you. This is compatible with every vehicle that has the "vehiclelightson128" texture, which most of the time happens with modded vehicles. But it definitely does with default vehicles. [RED] = Unaffected lights [GREEN] = Affected lights In action: Currently this script has 3 custom functions and 2 custom events, these are: setVehicleLightsOn(vehicle, state) - This is a workaround for the default setVehicleOverrideLights function. [server] setVehicleReverseTexture(vehicle, state) - With this function you can toggle the reverse light texture on/off. [shared] isVehicleReversing(vehicle) - Returns true if the vehicle is reversing, false otherwise. [currently server only] onVehicleStartReverse - Parameters: driver, lightState [server] onVehicleStopReverse - Parameters: driver, lightState [server] driver: The player who drives the vehicle lightState: The light state of the vehicle (true/false). This returns the value set by setVehicleLightsOn function. Always returns something. The source of these events is the vehicle that starts/stops reversing. These events are triggered when a vehicle starts/stops reversing. More updates coming soon! I always like to read suggestions, so feel free to comment your thoughts and what should I add/remove! Thank you for reading, hope you like it! Part of the Advanced Vehicle System project.
  7. Own list DX - ScrollBar problem ...

    I think this resource has a pretty good and easy example for a dx scroll bar, this might help, I would take a look and give it a try if I was you. https://community.multitheftauto.com/index.php?p=resources&s=details&id=14403
  8. [HELP] Blur Shader

    I think this would do the trick. https://community.multitheftauto.com/index.php?p=resources&s=details&id=7545 Or maybe just draw a barely visible vignette like, white (so you can set the color via script) image?
  9. mta error

    Amit en javasolnek az az lenne hogy probald meg az egesz GTA SA-t ujra rakni, esetleg masik verziot letolteni es azzal megprobalni vagy esetleg masik meghajtora/mappaba telepiteni, miutan teljesen letoroltel minden MTA-hoz es GTA SA-hoz fuzodo dolgot. En ezt probalnam meg ha vegkepp semmi informaciot es segitseget nem talalnek errol neten.
  10. [SHOW] Vehicles Get Dirty

    Information for the resource: Shared custom functions: int getVehicleDirtLevel(element vehicle) - Returns a number representing the dirt level of the vehicle. 1 is the lowest (fully clean) and 5 is the highest (most dirty). int getVehicleDirtProgress(element vehicle) - Returns a number representing the dirt progress of the vehicle. See the script files for better understanding! int getNextDirtTime(element vehicle) - Returns a number representing the time limit when the vehicle gets dirty again. See the script files for better understanding! bool setVehicleDirtLevel(element vehicle, int level) - Returns true if set succesfully, false otherwise. IMPORTANT: Using this on client side won't make the vehicle "globally" dirty, only for the client, use this on server side mostly, since this is where other things like dirt progress and other datas are being set. Also, it will only work for other clients (by that I mean that they will see the effects of the shader) if you use this function on server side. Server side custom functions: bool setVehicleDirtProgress(element vehicle, int progress) - Returns true if set succesfully, false otherwise. Sets the dirt progress of a vehicle. See the script files for better understanding! bool setVehicleDirtTime(element vehicle, int time) - Returns true if set succesfully, false otherwise. Sets the dirt time of a vehicle. This is a limit which checks if a vehicle has to get a dirt level or not. See the script files for better understanding! Server side custom events: onVehicleDirtLevelChange - Parameters: int oldLevel int newLevel oldLevel: The old dirt level of the vehicle, before the event was triggered. newLevel: The new dirt level of the vehicle, after the event was triggered. The source of this event is the vehicle that got its dirt level changed. This event is called when a vehicle got its dirt level changed. For example a vehicle was washed in a carwash. Client side custom events: onClientVehicleDirtLevelChange - Parameters: int oldLevel int newLevel oldLevel: The old dirt level of the vehicle, before the event was triggered. newLevel: The new dirt level of the vehicle, after the event was triggered. The source of this event is the vehicle that got its dirt level changed. This event is called when a vehicle got its dirt level changed. For example a vehicle was washed in a carwash.
  11. [SHOW] Vehicles Get Dirty

    Released! Check the post for download link! Sorry for making it that long, I didn't have enough energy to work with MTA in the last few days. Anyways, enjoy the resource, hope you like it! Note that it might contain bugs or glitches, if that's the case please report them and I will try to fix it as soon as possible! You can edit the resource based on your needs, all I ask for is to leave the credits for me! Have fun!
  12. [REL] Blips on screen

    It's my own remastered version of Jayceon's radar mod that can be found on the community. https://community.mtasa.com/index.php?p=resources&s=details&id=12641 This one. But unfortunately I don't have the one on the pictures.
  13. [SHOW] Vehicles Get Dirty

    New update! This resource is almost done, I will do a few more testing and improvements and I might release it, don't know for sure yet, first of all I would like to make sure it's flawless. Note that I don't spend my whole days sitting in front of my PC, scripting MTA. Don't expect me to finish this / any other project(s) I have posted in 2 days.
  14. Only one wheel is returned with getVehicleComponents

    Thank you, I fixed everything you mentioned, works perfectly now. Thank you again!
  15. Only one wheel is returned with getVehicleComponents

    Yes, I also noticed that the effectDestroyTimer was global, I already fixed it, this doesn't seem to be the problem. Here's how I call the function: local waterSplash = {} function waterSplashEffect() for k, vehicle in pairs(getElementsByType("vehicle")) do if isElementStreamedIn(vehicle) then if not isVehicleBlown(vehicle) then if isVehicleOnGround(vehicle) and not isVehicleOnRoof(vehicle) then if getVehicleSpeed(vehicle) >= 10 then waterSplash[vehicle] = createEffectAtWheels(vehicle, "water_splash", 1000) end end end end end end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), function() setTimer(function() waterSplashEffect() end, 50, 0) end )