Jump to content

Killbean

Members
  • Posts

    9
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Killbean's Achievements

Newbie

Newbie (4/54)

1

Reputation

  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","Saimir","Vullnet","Orgest","Roland","Ferdinand","Neritan","Gazmir","Gersi","Genci"], "female":["Alesia","Anamaria","Greis","Klea","Sara","Sidorela","Uendi","Armela","Megi","Sindi","Drita","Albana","Kejsi","Adea","Anila","Suzana","Loreta","Alma","Arnisa","Adea","Besa","Adea","Dorina","Elvira","Entela","Enkelejda"], "surnames":["Bogdani","Dervishi","Dukagjini","Dushku","Frasheri","Gjoni","Gurakuqi","Hoxha","Leka","Loshi","Prifti","Baku","Kola","Zane","Musaj","Agolli","Brahimi","Kodra","Osmani","Myftiu","Xhafa","Dedja","Duro","Demiri","Shyti"] }], [{ "region":"Argentina", "male":["Agustín","Sebastian","Nicolas","Lautaro","Tomas","Lucas","Joaquín","Santiago","Federico","Juan","Juan Pablo","Andres","Thiago","Benjamín","Bautista","Franco","Francisco","Matías","Gabriel","Martín","Marcelo","Pablo","Gustavo","Hernan"], "female":["Sofía","Isabella","Jazmín","Mia","Juana","Martina","Morena","Uma","Lucía","María","Victoria","Laura","Agustina","Lucrecia","Florencia","Emma","Pamela","Cecilia","Carolina","Mariana","Luciana","Patricia"], "surnames":["Gonzalez","Rodríguez","Gomez","Fernandez","Lopez","Díaz","Martínez","Perez","García","Sanchez","Romero","alvarez","Torres","Ruiz","Ramírez","Flores","Acosta","Medina","Suarez","Herrera","Aguirre","Gimenez","Molina","Castro","Rojas","Ortiz","Nuñez","Juarez","Ríos","Godoy","Moreno","Peralta","Castillo","Ledesma","Ojeda","Villalba","Hernandez","Ramos","Arias","Maidana","Moyano","Campos","Soto","Montenegro","Leguizamon","Blanco"] }] ]
  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...