• Content Count

  • Joined

  • Last visited

Everything posted by maximumdrive

  1. Sorry, perhaps I didn't explain it correctly. It's really possible to open it with zModeler, but all those vehicles are 'fixed' to work with our tuning system, and there're too many components. The system works via onClientElementStreamIn()/Out(), making only needed vehicle components visible. In case of sync, I have to write endless component-tables, that looks like a great kind of routine, so I try to find an '(half)-automatic' solution.
  2. Hi all, it's possible to get a Lua-table containing vehicle component's names using client function getVehicleComponents(). But there also can be components, which are dummies/containers, having subcomponents, e.g.: -hoods ---hood1 ---hood2 Please note that they can be not only 'standard' (as 'boot_dummy', 'door_lf_dummy' etc) in case of custom vehicle models. Is it possible to parse DFF's raw data in a way to detect 'containers' having subcomponents? Perhaps it could be nice to check them via getVehicleModelDummyPosition() (if false, that's not dummy LOL), but this function works only with stock GTA dummies as it is noticed in wiki. Please help.
  3. Hi all, I'm on my way to make a kind of a 'private-area' system. Everything is fine with creating both of createColRectangle()+createRadarArea(), but how do I avoid matching/crossing existing areas with a newly created one? I tried to implement it via getElementsWithinRange() being based on colRectangle's position and it's size as a range-argument, but it wasn't successful, because it detects all the areas in range ignoring the scaling direction. E.g. I couldn't create a colshape longer because there was a colshape on the left or wider because there was a colshape 'above'. There is a 'table-organized' variant if it helps. All the coordinates are 'demo', because originally everything is set dynamically. areaShapes[areaID] = { ["details"] = { ["x"] = 318.4215, ["y"] = 1027.973, ["z"] = 14.25, ["sizeX"] = 25, ["sizeY"] = 20, }, ["square"] = 500, ["area"] = createdColShapeElement, ["radarArea"] = radarAreaElement, ["onHit"] = addEventHandler ( "onColShapeHit", createdColShapeElement, hitArea ), ["onLeave"] = addEventHandler ( "onColShapeLeave", createdColShapeElement, leaveArea ), } Any ideas?
  4. It sounds funny, but I met such a problem in 2019 I googled for and found, that 'register'-command was somewhere in admin's resource ('commands.xml'-file). But CTRL+F doesn't think in such a way... Looked through both of 'admin' and 'admin2' resources. Please help.
  5. Hi all, I own a 'vehicle-oriented' MTA:SA server, which was grounded a couple of years ago. Our team has grown up within the fun/gaming process in cases of ideas and modelling (there are about 10 stable 3D-modelling/-designing enthusiasts at the moment), so I personally had to go on with my scripting and 'thought-scaling' skills. It is also could be very familiar/close to many MTA-enthusiasts, that organizing/'management' (except coding) of such kind of team takes much time, attention and effort. Now I met that 'level' where all the ideas and large amount of routine became a kind of 'hardly storable' thing for my head being the only Lua-coding and 'general processing unit' in the project. The same trouble meets the project in general - many things which were released within the server updates could be not less useful in much bigger number of places worldwide, so the current project looks like a 'too small house for a too large family'. Here is an 'example'-(short)list of systems which were successfully released/resolutely begun by me and my teammates. More info could be presented personally to people who become interested in. Vehicle platform/base unification. At first, it looks like a simple 'setVehicleComponentVisible'-based tuning system, but it becomes much more complicated and interesting, when it goes about 'realistic' exterior-detailing, which needs a large work done not only by modellers, but also by a crew of general car enthusiasts, which look for and finally provide technical info about how every model/modification looks in real life and which parts should be modelled. All opening panels (doors, bonnets etc) DO have synchro, so they open/close such as the original GTA-components do. Vehicle-'damage' system with component movement and 'wrecking' HLSL-shaders (in progress). Photos possible for interested in cooperation by request. Custom corona-based vehicle lights system. In-game vehicle component positioning with synchro and 'cross-DFF' tuning system (allows to install parts from another vehicle model). Full-3D numberplates system. Even plates are UV-mapped so they could be painted/textured in any way. All the fonts are so 'realistic' as possible being in 3D. Wheel system with separate tire-/rim changing possibility + tire texture changing. Large amount of other vehicle and general gaming systems, which could be described for ages if needed. Who is clearly needed? I'm looking for person/people who is/are interested in 'automotive' projects. That could be experienced Lua-developers (PAID) who could generate and implement 'outstanding' ideas, and even other enthusiasts, who want to improve their skills. The main goal for the moment is optimizing the routine (please note that 'routine' is only the word, sometimes it could be more complicated and 'prestige' than it sounds), because 'management'-tasks are taking more and more attention. Thats why I will be glad to communicate with any kind of people with corresponding level of personal interest to such kind of projects. If 'it goes', any kind of cooperation could be discussed. Skills which are 'greatly welcomed' (but not obligatorily): DX GUI development experience HLSL (shaders) I speak English / Ich spreche Deutsch / Спілкуюся українською / Говорю по-русски Please PM me if interested.
  6. Look, just imagine a vehicle with the shader applied on it's specific part using engineApplyShaderToWorldTexture(). I just want to know if it is possible to know the world position of that point, where the shader is applied. UPD: I just thought of getting pixels/screen position and using getWorldFromScreenPosition(), but I don't know in which way could I use that correctly.
  7. Hi all, is it possible to get a world position of a shader, applied to the only one object? Easier to say, is there a kind of an getElementPosition() analogue or the way to create it, which could allow to know applied shader's/object's specified texture's world position?
  8. Hi all, there is a well-known function warpPedIntoVehicle() which warps player into the car looking it like it was occupying that for ages. But is there a function which makes ped entering the vehicle in a kind of 'animated' way, as it is when onClientVehicleStartEnter is triggered? Easier to explain: is it possible to force the player/ped to enter a nearby staying vehicle in a normal, non-warping way?
  9. Thanks, I don't know why I haven't noticed that moment... So the right-steering scripting idea seems to be impossible 😥
  10. Hi all, I'm trying to use getVehicleComponentPosition() to move the driver's position for making middle-/right-seating vehicles. But the problem is that the getVehicleComponentPosition(vehicle, "ped_frontseat") returns false twice instead of x and y, and nil instead of z. That works fine with etVehicleComponentPosition(vehicle, "door_lf_dummy") local vehicle = getPedOccupiedVehicle(localPlayer) local cx, cy, cz = getVehicleComponentPosition(vehicle, "door_lf_dummy") -- works fine local csx, csy, csz = getVehicleComponentPosition(vehicle, "ped_frontseat") -- returns false, false, nil I've even tried to move ped_frontseat to a 'chasis'-container in the vehicle's model, but it doesn't cause any positive result. Somebody please tell me if it is possible to solve.
  11. Hi all, I'm creating a cross-model tuning system, which allows using components of another vehicle's model. Generally it's OK, but I've noticed that the component position influences not only the "target-vehicle", but also it generates component's positioning bugs in ALL vehicles of the same model. My question is theoretical: does the setVehicleComponentPosition/-Rotation() work with the vehicle object, or it runs on a kind of "model ID" level, affecting all vehicles of 'that' model? If not, in which way could I create a kind of sync-issue? onClientElementDataChange-tablesync etc?
  12. I've already tried that on client, but perhaps it could be successful somewhere on server, thanks for idea.
  13. Oh, now it's clear: the problem is, that the getPedOccupiedVehicle() works really fine, but when I try to create another vehicle it doesn't work for a newly-created serverside vehicle. But it creates, it's model successfully outputs to chatbox, but getVehicleComponents()'s length is "0"... The clientside code is the same as yours now. E.g. (Server): addCommandHandler("gvc", function (player) local pVeh = getPedOccupiedVehicle(player) local seat = getPedOccupiedVehicleSeat(player) if pVeh and seat == 0 then local px, py, pz = getElementPosition(pVeh) local px, py, pz = getElementRotation(pVeh) local v = createVehicle(405, px, py, pz-20, rx, ry, rz) setElementFrozen(v, true) setElementCollisionsEnabled(v, false) setVehicleLocked(v, true) attachElements(v, pVeh, 0, 0, -6, 0, 0, 0) triggerClientEvent(player, "onClientGetVehicleComp", player, v) end end)
  14. Hi all, my question is so close to be "stupid/funny", but I wasted several hours to fight those lines. Here is a clientside function handling an event. Element's model is viewed to *debug* if the vehicle comes from server. The problem is that the vehicle exists, model also does, but the length of *sincerely beloved* getVehicleComponents(veh) is always "0"! It only can type component's list when the function is "bouned" on a key which has to be pushed for tens of times to meet a success! The "central surprise" is that the usage example of getVehicleComponents is taken from MTA Wiki and it fails! I've found some reports, so the components are in some way cached by MTA/GTA-single, so it could influence this simple code, but I can't even imagine what is the problem. I'm totally discouraged by such a mysticism and have no ideas about causes. Please, help. function tunBaseComp(veh) outputChatBox(tostring(getElementModel(veh))) local getComponent = getVehicleComponents(veh) if veh then for k in pairs(getComponent) do outputChatBox(k) end end end
  15. Thank you! Great solution, the difference is indisputable, works super!
  16. Hi all, I've implemented some simple encoding solutions for vehicle models like "read base64+teaEncoded file->decrypt on client->engineLoadDff() with file's decoded raw data as an argument instead of filename". But the problem is, that our tuning system is large and makes non-encrypted DFF's sizes in some cases ~50-100MB (all parts are built into the vehicle's DFFs and shown via setVehicleComponentVisible()), so encrypted versions get about +80-90% of their own "weight", e.g. 65MB-DFF will be ~110MB because of encryption. That way causes performance troubles, performance browser isn't showing anything "bad" except 1.7GB cache's size. In several minutes after the player logged in the game crashes (obviously because of CPU/memory been flooded). Starting of the resources on clientside while cache is checked is also too "heavy" because of encryption, so many players can finally login only after several MTA client's brakedowns. Some experiments (using performance browser) have shown that restarting vehicle-resources after the player is ready with cache-check makes their "memory-consumption" be normal ~230-250KB (as non-encrypted analogues) instead of previous hundreds of megabytes. As I can assume, importing filebuffers in engineLoadDFF is also not that efficient: /reconnect-command is the worst idea for the moment, only complete MTA-restart can allow your 'relogin' without getting in troubles with MTA-crashes. I suspect that MTA can't collect all "trash" from the memory when using raw data instead of DFF-files. My colleagues don't think, that 1.7GB-cache is the main problem, they sent me tens of examples where the cache size can be about 3GB with no problems of that kind. Here is my code for that case, if I possibly have done some mistakes. So the main idea was to make client- and serverside files (serverside is needed to avoid visual mentioning of base64's key in client's cache). onClientResourceStart() triggers serverside event which triggers a client's one sending key to start decryption (numerous 'nils' I pasted there to dereference "large" variables manually trying to solve the performance-problem): function getVehicleKey(key) local fName = "model.dff" local modelID = 409 local buffer = "" local hFile = fileOpen(fName) if hFile then buffer = fileRead(hFile, fileGetSize(hFile)) fileClose(hFile) hFile = nil else outputConsole("DFF couldn't be loaded!") end local txd = engineLoadTXD('tex.txd',true) engineImportTXD(txd, modelID) local dff = engineLoadDFF(base64Decode( teaDecode( buffer, key ) )) buffer = nil engineReplaceModel(dff, modelID) dff = nil end addEvent("decryptCar", true) addEventHandler("decryptCar", localPlayer, getVehicleKey) addEventHandler('onClientResourceStart', resourceRoot, function() triggerServerEvent("sendVehicleKey", localPlayer, localPlayer) end ) Serverside's the only thing to do: function sendK(lp) local key = "keyishere" triggerClientEvent(lp, "decryptCar", lp, key) end addEvent("sendVehicleKey", true) addEventHandler("sendVehicleKey", root, sendK) Please help.
  17. Hi Galactix, try triggering client events with your argument's places changed, e.g. triggerClientEvent(theDrugPlayer, heroinOffMessage) As the Wiki says, trigger-target should be written at first in the args list.
  18. Didn't notice my fail while filling the 'buffer' LOL Then the question: how can I do it correctly? Debug swears on "glueing" the filefragments done in the next way. How can I attach binary bytesets into a complete raw data? while not fileIsEOF(hFile) do -- as long as we're not at the end of the file... buffer = buffer..fileRead(hFile, 500) -- ... read the next 500 bytes... -- ... and output them to the console end fileClose(hFile)
  19. Hi, I'm now trying to base64+teaEncode some of my models, the Wiki says that engineLoadDff can load not only DFFs, but the file buffer too. As a result, engineReplaceModel fails returning "false". So I have written some code to encode-decode the model data. Am I right with my understanding of "raw data" needed to give to engineLoadDff as an argument? P.S. I was looking for issue using forumsearch etc. for a long time, but I haven't found any analogues, everybody uses engineLoadDFF only with filename as argument. addEventHandler('onClientResourceStart', resourceRoot, function() local buffer local hFile = fileOpen("model.dff") -- attempt to open the file if hFile then -- check if it was successfully opened while not fileIsEOF(hFile) do -- as long as we're not at the end of the file... buffer = fileRead(hFile, 500) -- ... read the next 500 bytes... -- ... and output them to the console end fileClose(hFile) -- close the file once we're done with it else outputConsole("Unable to open the model file") end local enBuffer = teaEncode( base64Encode( buffer ), "xTN5#Gqm=sKn**dF" ) local deBuffer = base64Decode( teaDecode( enBuffer, "xTN5#Gqm=sKn**dF" ) ) local txd = engineLoadTXD('tex.txd',true) engineImportTXD(txd, 596) local dff = engineLoadDFF(deBuffer) engineReplaceModel(dff, 596) end )
  20. Could somebody plz tell if there are 'user-friendly' solutions for attached objects movement/rotation? I've seen something very familiar tens of times on MTA servers. The pic is a screenshoot from SAMP.
  21. The other way to use your great idea is to let vehicles become rusty
  22. Hi all, I'm in search for a component/library having positioning controls like on the pic shown. Here's a samp's "Attached object editor" screenshot, but I've seen the same solutions being 100% lua-implemented on several MTA (many of them were not that "professionally built") servers, this "editor mode" looked the same everywhere, so I guess there could be an open-source issue.
  23. Здравствуйте! Ищу скриптеров-энтузиастов, вероятно увлекающихся отечественным автопромом, для досборки тематического сервера (не бпан, тематика толковая и интересная) . Есть конкретные задачи, ТЗ напишу максимально подробно (сам программист, просто рук не хватает). С уважением отношусь к труду людей и понимаю, что бесплатно работать никто не будет. Но всё же, вдруг есть увлекающиеся автомобилями и желающие помочь фановому некоммерческому проекту спецы?