Dzsozi (h03)

Members
  • Content Count

    623
  • 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

65 Popular

About Dzsozi (h03)

  • Rank
    Pimp

Details

  • Location
    Hungary

Recent Profile Visitors

3,907 profile views
  1. @MrTasty helped me with the following useful function: https://wiki.multitheftauto.com/wiki/WordWrap I also needed it for a notification system. This could be useful if you want to do multiple line dx texts, this function also supports color codes going from the 1st line to the 2nd.
  2. Why don't you just use bone attach and attach a phone object to the player's hand?
  3. Very helpful, lots of beginner modellers will be grateful for your effort that you put into this video!
  4. ****Sighs**** Okay so you are trying to tell me to look up the wiki and community and basically the whole internet to create a new shader file, that - as I can see I must write it down again - can handle the replace of 4 textures at the same time. What kind of modeller are you if you couldn't find the default CJ textures in the game files bro? You are 100% right! But what does that have to do with my problem, nothing? It's a fact that peds vehicles and objects are being made in a modeling program bro, no sh#t! Have you ever checked this function on the wiki https://wiki.multitheftauto.com/wiki/EngineApplyShaderToWorldTexture ? I quote: so by that you probably already figured out that I am using the correct texture names, just because your HD downloaded CJ mod doesn't have its files named the same (let me guess they are called player_torso, player_legs, etc), it doesn't mean I am using the wrong textures, since MTA handles those texture names in a different way as we can see, with some quick semi enthusiastic research you could find the answer easy bro. Why are you linking me the MTA community site, I don't even know, so let's not talk about that. Well, about countless shader examples, I wouldn't say they are countless. But they are not examples for me in this case. Like you said, yes, those are shaders, and this is what I use them for in this case as well. REPLACE TEXTURES, which means I edit the default texture, for example the torso and REPLACE it with a shader. So what does modeling has to do with it, I still don't get it. I don't have to do any UV mapping nor any modeling, why would I? You yourself said that shaders are for applying a texture to an object ped or vehicle. Looks like you are not completely understanding how texture replacing works if you only edit the default texture(?) You can keep telling me to go on YouTube or MTA forum (well, in this case this is what I just did, and that's the reason for this topic being existent, so again, I don't understand you), but there's a reason I made this topic... Probably because I didn't find the proper help I need and I am hoping for someone to help me out, don't you think? I didn't create this topic because I was bored. So, from now on, please avoid telling me the same thing "over and over in different ways" bro. Because you are not helping me, you are just trying to prove me wrong, that I must go and learn from wiki and search up the whole internet for a solution to my problem. I just asked a simple question which is: HOW CAN I MAKE A SHADER THAT CAN HANDLE MULTIPLE TEXTURE REPLACES AT ONCE??? No modeling, no UV mapping, no Facebook or YouTube or Twitter search for help, just a simple question on MTA forum in a topic about shaders. You don't have to tell me that I am doing it wrong and must find a different way via modeling, (even if I already have my system ready, just willing to improve it) when you are the one who doesn't even know where to find the default game textures. And now, back to the main question again: HOW CAN I MAKE A SHADER THAT CAN HANDLE MULTIPLE TEXTURE REPLACES AT ONCE??? ???
  5. https://community.multitheftauto.com/index.php?p=resources&s=details&id=4413 https://community.multitheftauto.com/index.php?p=resources&s=details&id=6889
  6. Well, thanks for your help, that I way I could "just learn" HLSL shader programing and fix the problem on my own. Could you already please tell me what does the modeling has to do with my problem? Learn to do what in a modeling program? I don't even understand... I already made my system and it is working, I just want to improve it by minimizing the amount of shaders I use in my script and that's what I need help with, writing a new shader file that can handle multiple texture replacing.
  7. Yes, maybe it is not a big performance question at all, but it would be also easier to change the textures, I mean less lines in the script itself. For example not having to destroy all the shaders and such, just change the shader value. @Ren_712 Can you give me a helping hand regarding the question of this topic?
  8. Check if the player is in a vehicle and then set the vehicle’s position as well. local vehicle = getPedOccupiedVehicle(p) if vehicle then setElementPosition(vehicle, 0, 0, 5) end
  9. @Pirulax is right, it doesn't work, the feet texture is being put on every part of the character.
  10. I am not sure how I should use this with my code. I tried many ways of adding, substracting and calculating but it always happened that I got spawned outside the given area coordinates. This is my current script: spawnPositions = { ["Whetstone"] = {minPos = {-188.8860168457,267.83926391602}, maxPos = {-204.15943908691,251.66763305664}, z = 12.078125}, } function getRandomPositionInArea(minValue, maxValue) -- Be a number #1 local value1 = minValue local value2 = maxValue -- Be different! ;o local difference = (value1 - value2) -- Be positive! :D local positiveDifference = math.abs(difference) -- Be ra ndo m! local randomPositiveDifference = math.random(positiveDifference) local randomDifference if difference < 0 then -- Be negative :( randomDifference = -randomPositiveDifference else -- Stay positive! :DDDD randomDifference = randomPositiveDifference end -- Be famous print(value1+(randomDifference-value1)+value2) return value1+(randomDifference-value1)+value2 end function getRandomSpawnPoint(cityName) if spawnPositions[cityName] then local minX, minY = spawnPositions[cityName].minPos[1], spawnPositions[cityName].minPos[2] local maxX, maxY = spawnPositions[cityName].maxPos[1], spawnPositions[cityName].maxPos[2] local x, y = getRandomPositionInArea(minX, maxX), getRandomPositionInArea(minY, maxY) return x, y end end local cityName = "Whetstone" local x, y = getRandomSpawnPoint(cityName) setElementPosition(localPlayer, x, y, getGroundPosition(x, y, spawnPositions[cityName].z)+1)
  11. I would like to have random spawnpoints inside a given area. I have the positions for minimum and maximum positions, but for some reason I can't manage to get the script working properly. I am using math.random from min to max values, but sometimes I get spawned outside the area, it doesn't return the right values. How can I get it working properly, so I spawn only inside the given area? spawnPositions = { ["Los Santos"] = {minPos = {1127.3712158203,-1632.8560791016}, maxPos = {1139.2634277344,-1621.2121582031}, z = 18.610622406006}, ["Las Venturas"] = {minPos = {1460.0589599609,2615.3452148438}, maxPos = {1478.0885009766,2622.806640625}, z = 10.8203125}, ["San Fierro"] = {minPos = {-2253.4848632813,521.00201416016}, maxPos = {-2250.8369140625,544.48956298828}, z = 35.174301147461}, ["Tierra Robada"] = {minPos = {-2259.4995117188,2352.9875488281}, maxPos = {-2253.8283691406,2372.5617675781}, z = 4.9140625}, ["Bone County"] = {minPos = {-244.1667175293,1210.9313964844}, maxPos = {-214.33074951172,1223.3796386719}, z = 19.735198974609}, ["Red County"] = {minPos = {243.48251342773,-160.65313720703}, maxPos = {252.89712524414,-151.75907897949}, z = 1.5703220367432}, ["Flint County"] = {minPos = {19.591306686401,-2641.8295898438}, maxPos = {37.629207611084,-2632.4833984375}, z = 40.432315826416}, ["Whetstone"] = {minPos = {-2122.837890625,-2481.69921875}, maxPos = {-2118.30859375,-2466.0988769531}, z = 30.625}, } function getRandomSpawnPoint(cityName) if spawnPositions[cityName] then local realTime = getRealTime() math.randomseed(realTime.second + realTime.minute + realTime.hour) local minX, minY = spawnPositions[cityName].minPos[1], spawnPositions[cityName].minPos[2] local maxX, maxY = spawnPositions[cityName].maxPos[1], spawnPositions[cityName].maxPos[2] local x, y = math.random(minX, maxX), math.random(minY, maxY) return x, y end end I guess it is because of the negative values, how to do the calculations for math.random?
  12. That has nothing to do with my problem. My problem is that I don't know how to write the shader file properly to handle 4 textures that is being changed in the script.
  13. Link me the topic where I asked this question in a different way. If you are not trying to help then please avoid commenting.