Jump to content


  • Content Count

  • Joined

  • Last visited

Everything posted by Killbean

  1. Hello guys, I have question how much efficient is to call for key, player in ipairs(getElementsByType("player")) do in OnClientRender function? Is there any other more performance efficient way? My another question is if getElementData in OnClientRender affects performance? Thanks a lot!
  2. Thanks for a tip - I had some resource that recalculated distance to all pickups every frame. I deleted it, but it still takes around -12FPS continuous. It is more efficient to call createPickup on server or client? Or for long term performance it does not matter? Thanks!
  3. Hello guys, I am using MTA createPickup method (https://wiki.multitheftauto.com/wiki/CreatePickup) to create pickups in front of interiors. I am calling createPickup on serverside around 170 times (I have around 170 enterable interiors). But this takes my client FPS by a lot (about -20FPS). I dont understand why it takes so much FPS because pickups are rendered only from some distance. Does anonyone know how to solve this? Thank you very much!
  4. Hello guys, I am trying to parse json file with this formating: [ [ { "region": "Albania", .... } ], [ { "region": "Austria", ... } ] ] I am using MTA fromJson method. Whenever I want to get element by json[1].region I correctly get "Albania". Bud when I try json[2].region I get error. I will be glad for any help. Thanks! [ [{ "region":"Albánie", "male":["Aleks","Alesandro","Aron","Enrik","Flavio","Luis","Noel","Alban","Andi","Endri","Ermir","Arlind","Glen","Daniel","Erion","Lorik","Edi","Saim
  5. So progress! I tried onPlayerVehicleEnter again. When player enters vehicle he closes door and then onPlayerVehicleEnter opens it. I need to remove closing door animation when player enters vehicle.
  6. Thanks for discussion! I tried also onPlayerVehicleEnter, but this does not work either. Because default internal implementation of onVehicleStartEnter is that after some time elapsed the door will be closed.
  7. Thanks, I know...But DoorOpenRatio is automaticly set to 0 (closed) when player enters vehicle. So this does not work: function startEnterVehicle ( player, seat, jacked, door ) --when a player enters a vehicle local vehicle = getPedOccupiedVehicle ( player ) setVehicleDoorOpenRatio ( vehicle, seat + 2, 1, 0 ) -- open vehicle door end addEventHandler ( "onVehicleStartEnter", getRootElement(), startEnterVehicle)
  8. Hello guys, I am hoping someone here can help me to do imposible task. I need vehicle doors to stay open after I enter vehicle. How to do it? Does somebody knows? Thank you very much!
  • Create New...