Jump to content

AlexRazor

Members
  • Posts

    23
  • Joined

  • Last visited

Everything posted by AlexRazor

  1. Probably here: float value = (color.r + color.g + color.b) / 3; You should replace 3 with var and set this var value from your script.
  2. Didn't quite understand you. First you replace original 355 model with invisible model. Then you replace 2965(for example) model with AK model. Then you replace 2966(for example) model with AK CAMO model. When you want to give someone weapon you do giveWeapon(30) then createObject with model object ID of weapon of choice(2965 normal ak OR 2966 camo) and then attach thath object to player hand.
  3. You should replace original AK model with invisible model and replace any usable object model with model of camo AK. Then you give player weapon(with invisible model) and attach camo AK model to his hand while he uses AK.
  4. You can add original ak as custom weapon. You replace objects with weapon skins and attach them to your hand.
  5. You can make it a lot easier. Just make original weapon invisible(by editing txd) and then or attach object or attach weapon.
  6. I'd try something with OnClientRender, GetCursorPosition and SetElementPosition.
  7. Any exapmles with performance before and after?
  8. Make default weapons invisible by txd or other ways, use bone_attach resource to add models of "weapons" and attach them to hands, mute default sounds and add sounds by OnClientPlayerWeaponFire and then add custom damage and etc through scripting.
  9. Make original weapons invisible by making txd invisible. Attach object of custom weapon by using bone_attach resource.
  10. I can suggest you to not use few timers, but one timer with 1 sec duration and multiple times to execute and some if's inside function. local timerN = 0 function someFunction() timerN = timerN + 1 if timerN == 1 then print("3") elseif timerN == 2 then print("2") elseif timerN == 3 then print("1") elseif timerN == 3 then print("GO") timerN = 0 end end setTimer(someFunction, 1000, 4)
  11. https://community.multitheftauto.com/index.php?p=resources&s=details&id=11836 Try this.
  12. I just watched one or two videos like "Lua in hour" and then looked through some source codes of resources and mta scripts, then tried to write what i needed.
  13. I can only give this tutorial on russian. And you could try this modified kams script, i saw it has something with vertex colors. https://gtaforums.com/topic/907323-rel-kams-gta-scripts-2018/
  14. You must create prelight for object.
  15. So i actually tried it and it doesn't work for me. Why?
  16. Thanks for help! This two functions doing one thing for me: they hiding bad view distance of small objects by lowering view distance of lods and etc(farclip) and making it smoother(fog).
  17. Hi. I have map with some objects and I have place with big rocks there. Is it possible to make view distance of this rocks very far? In a way like terrains, houses and etc. loaded, i mean from very big distance. I already used engineSetModelLODDistance and tweaked setFogDistance + setFarClipDistance. What can i do to increase distance? I thinked about gluing some of rocks in single object. Atm they are loaded like this:
  18. AlexRazor

    Camber

    Then i cant undertand why it doesnt work(but probarly it needs some hard math). Have you tried to set some constant values of rotation?
  19. AlexRazor

    Camber

    You can update it really often(or you cant?) or you can try to make wheels with objects like wheels on NFS:SA server.
  20. Если честно, то я просто переписал гуи наново, что-то еще подшаманил и сейчас всё работает. Ну и в тот день я еще не знал про консоль отладки, так что на вопрос ответить не смогу.
  21. Доброго времени суток. Возникла проблема при написании мода. Я скриптер начинающий, так что сразу извиняюсь за возможные "глупости". Есть гуи кнопка(crbutton) и addEventHandler(37-38 строчка) который должен реагировать на нажатие этой кнопки, а проблема в том, что он никак не реагирует. Вроде как аналогичный код для других функций спокойно работает, а конкретно тут проблема.
×
×
  • Create New...