Jump to content

Thomas_Nightfire

Members
  • Posts

    35
  • Joined

  • Last visited

Everything posted by Thomas_Nightfire

  1. Т.е. лучше установить нужным элементам какой-то элемент родительским, и прикрепить один обработчик к нему, это я понял. Ну а много персональных обработчиков для разных элементов -- это не удар по производительности? А как быть, если нужно чтобы некоторые элементы принадлежали одновременно к разным "группам" (ну т.е. быть детьми разных родительских элементов)?
  2. Подскажите, а что лучше: много "персональных" обработчиков событий (т.е. прикрепленных к отдельным элементам) или один обработчик, прикреплённый к корневому элементу, который срабатывает даже тогда, когда это не необходимо?
  3. Спасибо за ответ... Я уже смотрел сервера в браузере и увидел, что не так много народу играет вообще.. и, насколько я понял, онлайн держат сервера с RP-режимами, у серверов типа Light RP или других онлайн невысок. Вот и думаю, стоит ли писать свой игровой режим и платить за хостинг, и будет ли сервер этот кому-то нужен..
  4. Доброго времени суток. Подскажите: актуально ли вкладывать кучу и сил времени в разработку собственного сервера с нуля МТА в 2022? Я имею ввиду, стоит ли ждать стабильного (пусть и небольшого) кол-ва игроков на сервере и вообще какого-либа интереса со стороны сообщества? И какие игровые режимы могли бы быть наиболее интересны?
  5. Thanks a lot, undertood. But to not make another topic, how can I update peds frequently? I mean serverside timer with ~100ms will be bad, like u said earlier. I've made a resource with NPCs and it works with 200ms-timer and it's a bit laggy even playing with my friend on local network. May be I need to use onClientPreRender or clientside timer to check state of peds? But I think it would be better to check their states serverside to avoid any desync... P.S.: like in CrystalMV's NPC HLC Traffic - 200 ms for serverside 'lightweight' update for unsynced peds & onClientRender for synced
  6. You mean set data to ped server-side, and with timer / other often repeating event check this data and do actions on client? Loaded players? A variable root isn't include all players currently online? There aren't the same? I'm sorry, I think I do not understand MTA Tree System...
  7. Hello everyone! Usually when I need to sync peds for every player, I have to call triggerClientEvent(getRootElement(), 'someEvent'), but is it right? I've read that every entity (ped, player, vehicle) have an a syncer which is syncing data and tells server about it -> server tells other clients... and I've tried to call triggerClientEvent(getElementSyncer(ped), 'someEvent'), but when I connect other client, only syncer sees ped control state (forwards, in my case), but second player sees ped only changing his pos and Z-rot and no control state changing.. So the question is: I have to trigger event for every client, or the other way exists?
  8. Why I can't set requested ped model to the player? Model is loaded, assigned to ped and it is visible, but there is no effect when trying to set this model ID to player after replacing model .dff and .txd...
  9. Nice... thought another way exists, but thank you
  10. Can u please write a simple example how to overwrite it's behaviour? And if rocket blows up something, who's be responsible for it? Owner?
  11. MTA 1.5.8 r20743 (Nightly Build) How to prevent ped from entering vehicle after he dragged out player/ped when using setPedEnterVehicle? Cancel onClientPedVehicleEnter or onClientVehicleEnter has no effect.
  12. I've tried to set velocity, but idk how to set proper velocity to fire in certain XYZ point... And even using velocity arguments, rocket sometimes flies not straight: after a few seconds changes direction to player camera or whatever I can't understand Please help!
  13. Hey there! Is there a way to set projectile a direction? I've tried to test Rocket, but it always fly to direction of player camera... Tried to set rotation of projectile, but it only changes rot of it, not the direction. Please help!
  14. May be someone knows animation block and name for original cop twohanded shoot action which used for cops in singleplayer?
  15. Unfortunately, these params don't change anything... I've tried. Unfortunately, these params don't change anything... I've tried.
  16. Now I'm try to simulate ped do a carjack to the player with animations like in singleplayer, and I have a problem: when ped attached to vehicle, I found no way to play animation with updating position... ped plays animation in the same place and not moving, but when call 'setPedAnimation', I've set 'updatePosition' to true, but no effect.. May be someone tried to simulate SP ped enter/jack vehicle? May be someone made that already in resource?
  17. I'm creating script that creates weather regions and when player enters one of them, weather will change. What your advice how to do it more optimized way (using less memory, creating less lags)? I thought creating a lot of ColShapes and working with hit/leave events is a waste of memory, no?
  18. I need to check is player in certain zone, which variant is more optimized? 1. Usage of ColShape: creating ColShapes as zones and using hit/leave events 2. Timer (500 ms) which checks if player position in boundaries (zone bounds will be defined in table) It will be a lot of areas where player can be, so what way more efficient to not loose bandwidth?
  19. Understood, but can u write a code, how it must work?
  20. Great idea, but Marker it's another type of Element, so *Object functions not applicable
  21. Hello there. I'm looking for way to make markers of type 'arrow' to move up and down like enex markers in singleplayer, how can I do it?
×
×
  • Create New...