Jump to content

LeroY

Members
  • Posts

    26
  • Joined

  • Last visited

Everything posted by LeroY

  1. How to get size of vehicle? Start_x, End_x and sum dist and height? Get position components or ... ?
  2. I had such an idea. There were first developments, but they were postponed. It makes no sense. Because Lua is very slow.
  3. Help me. Can I access the player's memory via a C++ module for MTA? For example, change some inaccessible car settings.
  4. Is there a shader раrrаIaх?
  5. How to make the player move in the recharge animation? setPedAnimation(source,"UZI","UZI_RELOAD",-1,false,false,false,false) setPedAnimation(source,"UZI","UZI_RELOAD",-1,false,false,false,false) I used: setPedAnimation(source,"UZI","UZI_RELOAD",0,false,true,true,true) Then the animation can not be brought down. How to be?
  6. In general, it seems just impossible. Just manually re-create the mapping. THE TOPIC IS CLOSED!
  7. can it be possible to somehow translate this function into a reverse action? its author Essle Function to translate angles of Euler into quaternions. Arguments: RotX, RotY, RotZ Return: RotX, RotY, RotZ, RotW function math.quaternion(x, y, z) local c = { math.cos(math.rad(-x)), math.cos(math.rad(-y)), math.cos(math.rad(z)) } local s = { math.sin(math.rad(-x)), math.sin(math.rad(-y)), math.sin(math.rad(z)) } local t = { c[2] * c[3], s[1] * s[2] * s[3] + c[1] * c[3], c[1] * c[2] } return math.drt(1.0 + t[1] - t[2] - t[3], (c[3] * s[1] - c[1] * s[2] * s[3]) - (-s[1] * c[2])), math.drt(1.0 - t[1] + t[2] - t[3], s[2] + (c[1] * s[2] * c[3] + s[1] * s[3])), math.drt(1.0 - t[1] - t[2] + t[3], (s[1] * s[2] * c[3] - c[1] * s[3]) - (c[2] * s[3])), math.drt(1.0 + t[1] + t[2] + t[3]) end function math.drt(a, b) a = math.sqrt(math.max(0.0, a)) * 0.5 return (b and ((b < 0) and -math.abs(a) or math.abs(a)) or a) end
  8. Help me, please, as fix convert quartenion to euler angles in .ipl files I'm getting an incorrect turn of the object. But this does not happen with all the objects, but only with a part. function quaternionToEuler(q) q.x = q[1] q.y = q[2] q.z = q[3] q.w = q[4] local sqx = q.x * q.x local sqy = q.y * q.y local sqz = q.z * q.z local sqw = q.w * q.w local unit = sqx + sqy + sqz + sqw local test = (q.x * q.y) + (q.z * q.w) if (test > 0.499999999 * unit) then return {0.0,(2 * math.atan2( q.x, q.w ) * 57.295779513082320876798154814105) % 360,90.0} elseif ( test < -0.499999999 * unit ) then return {0.0,(-2 * math.atan2( q.x, q.w ) * 57.295779513082320876798154814105) % 360,270.0} end return { (math.atan2((2 * q.x * q.w) - (2 * q.y * q.z) , 1 - (2 * sqx) - (2 * sqz)) * 57.295779513082320876798154814105) % 360, (math.atan2((2 * q.y * q.w) - (2 * q.x * q.z) , 1 - (2 * sqy) - (2 * sqz)) * 57.295779513082320876798154814105) % 360, (math.asin(2 * test) * 57.295779513082320876798154814105) % 360 } end
  9. It's like a bug mta. Can you create a report for a bug? I just do not know much English.
  10. Yes. I' am tested on runcode or on custom resource (client.lua, meta.xml). Server standart resource pack, running on only "play" mode.
  11. I have: Processor: Core I7-3630QM Video card: GT740M OC RAM: 8 GB DDR3
  12. help me, please, as fix from peds dropping fps? I'am created 20 ped's and fps dropped on 46 frame per second. As have fix this problem? -- CLIENTside for i = 1, 20 do local data = dillers[i] createPed(data.skinid,data.x,data.y,data.z) end They are all standing side by side. I' am sorry, bad speak on english. I am don't speak english.
  13. Что за ошибка и из-за чего? Сама ошибка: attemp to index global 'shapecrash' (a userdata value) Разобрался. Забыл включить: oop
  14. Простите, модели весят 147 мегабайт. Я случайно не те выбрал. Причем на сервере отключены абсолютно все ресурсы кроме самого оружия.
  15. 1. Заметил, что 700 мегабайт ест модели оружия. Обычные .dff и .txd файлы без .col весом общим 296 мегабайт. 2. Заметил что 700 мегабайт кушало замена текстур с помощью шейдера (перевел с argb на dxt3 всё стало нормально, 100 мегабайт).
  16. Что происходит? После игры около четырёх часов без остановки оперативная память (6 гигабайт) попросту начинает не хватать. Начинаются лаги, вылеты либо выходит компьютер в ребут. Следил, когда выходит уведомление о нехватке памяти, мта весит около 4 гб в памяти. При этом, это наблюдается на разных серверах. Даже на своём сервере, на локалке тоже самое. Обычно 1700 мб жрёт, потом начинается, до 3-4гб тоже самое, происходит это не моментально, со временем. Как решать?
  17. I do not know English well, sorry for mistakes. I know that the speed can be changed by including glitch "sprintfast", and then with the client setPedControl ("Sprint", false) or setPedControl ("Sprint" true) in onClientRender with a delay of 10-50 ms But this speed is not enough, or I do something wrong ...
  18. How to change the running speed of the player? SetElementVelocity does not work!
  19. Oh, for sure! I was very blunt. Thank you)
  20. How do I find out in the onClientWeaponShot event that I hit the player in the head? Need to create your hitBoxes?
×
×
  • Create New...