Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 13/10/22 in all areas

  1. local x,y,z = getElementPosition(localPlayer) local myPed = createPed(0, x, y+1, z) setTimer(function() setPedFollow(myPed, localPlayer) end, 1000, 0) function setPedFollow(theElement, theTarget) if theElement then local x, y, z = getElementPosition(theTarget) local rx, ry, rz = getElementRotation(theTarget) local ex, ey, ez = getElementPosition(theElement) local distance = getDistanceBetweenPoints3D(x, y, z, ex, ey, ez) local rotation = findRotation(ex, ey, x, y) setPedRotation(theElement, rotation) if distance > 2 then setPedControlState(theElement, "forwards", true) else setPedControlState(theElement, "forwards", false) end end end function findRotation( x1, y1, x2, y2 ) local t = -math.deg( math.atan2( x2 - x1, y2 - y1 ) ) return t < 0 and t + 360 or t end try this also change script file type to client if you don't have any other code in the file it works, i tested it
    2 points
  2. if you have any questions please open a new thread and tag me, i will help you. ?
    1 point
  3. 1 point
  4. Чем меньше обработчиков событий, тем лучше. Но, вообще, не думаю, что Вы когда-нибудь столкнётесь с такой проблемой. Разве что будет добавлено запредельное количество. Тут уже придётся для себя выбирать лучшее решение. Если все элементы в пределах ресурса и требуется большое количество обработчиков — resourceRoot использовать и так далее. И не забывать откреплять обработчики, когда они не нужны.
    1 point
  5. Hello ladies and gentlemen! This map is only second of its kind. The energy and time nX_ and hUGAOXD have invested into this creation deserve special recognition. It's also worth the mention that the part starting after 3:12 has no editing from my side and overall, I tried to keep it simple since the map alone is a masterpiece! 1080p60 is advised. Credits: Songs: Trevor Something - I Want Your Love & Trevor Something - Come Back Down. Audi A7 Led Lights made by NitroN Follow these networks to stay in contact with me: Facebook: http://facebook.com/MicraTV. Twitter: https://twitter.com/MicraTV. Best regards, Micra.
    1 point
×
×
  • Create New...