Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 26/11/17 in all areas

  1. شرح كيف اسوي شرح
    2 points
  2. Hello! I would like to show you my current project I am working on. This is about vehicles getting dirtier while you are driving them (something you can see in GTA IV and GTA V). It is currently in beta, I may release if after I finished it! Here you can see some pictures of the current features of the script: Every vehicle that has the vehiclegrunge256 texture on it is compatible with this script (you can add your own textures in the script you would like to change, for example if the modded vehicle doesn't have the vehiclegrunge256 texture, but has a texture named only grunge, you can add this in a table, so it will work with that one as well). replaceTextures = { {"vehiclegrunge256"}, {"grunge"}, } The script contains car washes (you go into a car wash --> your vehicle gets cleaned). You can enable/disable custom car wash garage maps via script when adding a new car wash. carwashes = { -- x, y, z, rotation (for garage only), garage {2454.51343, -1461.01477, 24.00000, 0, false}, {1911.29041, -1776.22644, 13.38281, 0, false}, {1017.74756, -917.59283, 42.17969, 0, false}, {1574.125, -2350, 13.56247, 90, true}, } When the weather is rainy or you go into water with your vehicle it gets cleaner over time. Every vehicle is affected in this case, for example if there are vehicles parked around on the map with dirt on it and it is raining, they will get cleaner slowly. There are 5 states of dirt level, 1 is fully clean and 5 is the dirtiest. The script currently has 2 export functions which with you can change and get the dirt level of a vehicle (you can also get the dirt level of a vehicle with getElementData, but can't change it with setElementData, I will add dirt level changing with setElementData in further updates). Vehicles will get dirty faster if you drive on grass, sand, dirt, etc. They will get dirty anyways, but it is faster on materials that is not concrete or something similar. I will upload a video soon of the script so you can see it in progress. As I mentioned before, I might release it after it's done. Not much to add/improve, this means it will more likely to happen sooner than later. VIDEO: This is still a beta version! The video doesn't show real values of time and other intervals, everything is because of testing and showing a pre-version of the script. Work is currently in progress regarding this script / project! TO DO: [GREEN] = Done [ORANGE] = In progress [RED] = Need to be done - Fix any appearing bugs, requires a few more testing to make sure there are none [ * ] - Make it compatible with car paint shaders (I don't know yet if it is possible, I will try to do it) [ * ] - Add useful custom events (on[Client]VehicleDirtLevelChange, on[Client]VehicleWashed, etc. everything that is useful for further scripting and for developers) [ * ] - Make a better handler for getting vehicle dirty, right now the script uses onClientRender, there might be another solution that is more client friendly, I don't know, I will play around with possibilities [ * ] WHAT'S NEW: * 2017. 10. 13. - Custom dirt textures - Vehicle streaming optimization - Useful, dynamic debug panel, outputs and values for testing - You can switch between debug mode in game - Fixed syncing bugs / errors between client and server (some things still need to be fixed) - Improved car washes (far from done, still needs improving and adding some extras) - Improved "dirt-add-handling-progress" (can't say it better ) * 2017. 10. 14. - Fixed various present bugs (a few of them can be seen in the video) - Vehicles now store the current dirt progress when they are streamed out and streamed in - Rewritten dirt progress handling, more dynamic and 0 (didn't found any yet) bugs, depending on conditions (is it raining, is vehicle in water, etc.) - Client side event now triggers when server side event is triggered but not the opposite way - Improved debug display - Shortened and more optimized script Client side is about 350 lines (with debug) and server side is about 50 lines (with debug and commands) of code. * 2017. 10. 26. - Fixed a bug where the vehicles' dirt progress wasn't synchronized between players. - More optimized script - Custom functions: * getVehicleDirtLevel (shared) * setVehicleDirtLevel (server) * * getVehicleDirtProgress (shared) * setVehicleDirtProgress (server) * * getNextDirtTime (shared) * setVehicleDirtTime (server) * - Custom events: * onClientVehicleDirtLevelChange (client) * onVehicleDirtLevelChange (server) * * I always like to read suggestions, so feel free to comment your thoughts and what should I add/remove! Thank you for reading, hope you like it! Part of the Advanced Vehicle System project. EDIT: I would appreciate if somebody could tell me a simple but interesting name for the resource, that is not "Vehicles Get Dirty" (it is too long). I was thinking about VGD, but this is not good enough, nobody will know what does that mean if it gets uploaded to the community. Download: https://community.multitheftauto.com/?p=resources&s=details&id=14960 Note that you will have to give up on car paint shaders if you would like to use this resource, unless you know how to make both work, since I couldn't figure it out. But if you know, please let me know as well and I will fix this problem with a quick update on this resource!
    1 point
  3. Hello! I started working on a vehicle realism system project, and I would like to introduce it to you. What does the system (will) contain? Currently has: - Custom sounds for vehicles - Custom damage "handling" (scroll down a little bit to see what I mean by that) - Players can't push the vehicles with "bare hands", by just running into them, vehicles will stay in one place, but you can push a car with another car or other vehicle I just started working on this, it is in alpha state, so right now it has a lot of bugs, but not so much that I can't make a video about it, so video coming soon (I already recorded it, I just have to edit, render and upload it)! Will feature: - Panels on vehicles (mostly cars) won't break if you collide with something if you are not going so fast, kind of a bug fix, since GTA SA handles these door and etc. breakings really bad, but if you go with high speed the damage will be applied - Probably a little bit complex (at least more complex than current ones) fuel and some other engine systems - Interaction with vehicles, like opening doors from outside, etc. - More realistic handlings - Realistic ramming system, for example if you hit an other player at high speed, your car won't fly up in the air, making the other player just fall down in front of the vehicle and losing a little bit of health - another example: if you collide with a breakable fence, bollard, lamp or something at high speed, it will break more easily, depending on the object you collided with - Engine failure system - breakdowns - Some basic stuff for cars, like travel meter, indicators and etc. - Custom events and functions, like onVehicleRepair, etc. - Custom siren sounds and sirens, flashers for emergency and other vehicles with sirens - Vehicles will get dirty depending on the surface you drive it on, for example, gets dirty on: mud, grass, sand etc. surfaces, and nothing will happen if you drive on surfaces like: concrete, road, etc. Therefore you will have to get your car to a carwash. That's it for now, I can't remember anything else I wanted to do, if something comes into my mind I will just put it in the "Will feature" section. So what do I mean by custom damage handling? You will see it in the video, but for a short explanation: Right now every vehicle's health will only go down to 650 HP, not below, from there, if you collide with something and the vehicle lost more HP than 75 HP, your vehicle will start releasing smoke from the rear tyres. From now on, your vehicle has an element data, which means that your vehicle is overheating and damaged, that's why there is smoke coming out from it, but not in the regular way. You can damage your vehicle however you want, it won't blow up until it loses 150 or more HP. If your vehicle loses 150 (or more) HP, it will be set on fire at the same spot, next to the rear tyres, just like in GTA IV, however, you can still drive it. From this moment, you have 10 seconds to leave your vehicle and run away, after 10 seconds it will blow up. Of course, you will be able to fix and remove the smoke leaking from the vehicle, but you won't be able to "cancel" the blowing up process by fixing the vehicle. So this is what I mean by "custom damage handling", it is a little bit harder to blow up a vehicle, it's like it has more health, since you can damage it with hands and weapons that doesn't remove more HP than 150 at once. As I already wrote, video will be coming soon! P.S.: Sorry for the (grammar) mistakes in sentences, if I made any, I'm not perfect at English. v0.1 - Custom sounds for vehicles - Custom damage "handling" (scroll down a little bit to see what I mean by that) - Players can't push the vehicles with "bare hands", by just running into them, vehicles will stay in one place, but you can push a car with another car or other vehicle Video:
    1 point
  4. 1 point
  5. This might take me a few days, since I'm having a trouble with opening ports .. that's another thing, Until then, I'll send another reply here. Thank you so much for your help
    1 point
  6. Hello World! I've thought about this and I've decided to release the actual code in order to show the structure of things work in order to allow developers to be accommodated with SUI in order to make use of it in a full way when a full version will be released. Follow the development here: sDevelopment Download
    1 point
  7. That depends on a lot of things. The only way to figure it out is by testing and testing with multiple players. I also do not know if the function setElementVisible works for the team element. If not, then you also have to re-loop and collecting all players. What you need to do is testing it with multiple players. There are just no other options function LlamaServicio(Player, Team) if Team == "Police" then local players = getElementsByType ( "player" ) local aclGroup = aclGetGroup ( "Police" ) for k, polices in pairs(players) do local blipvisible = false local account = getPlayerAccount(polices) if not isGuestAccount(account) then local accountName = getAccountName (account) if isObjectInACLGroup ( "user." .. accountName, aclGroup) then -- chat msg here (polices, "Backup requested, location on GPS") outputDebugString("Blip Attached! For player: " .. tostring(getPlayerName(polices)), 3) local myBlip = createBlipAttachedTo(polices, 20) setElementParent(myBlip, playerBlipRoot) setElementVisibleTo ( myBlip, root, false ) -- make it invisible for all players. (this does not have influence on new joined players.) setElementVisibleTo ( myBlip, polices, true ) -- I am not sure if it works for team players. You should test it with multiple players. blipvisible = true end end if not blipvisible then outputDebugString("I am not the police. For player: " .. tostring(getPlayerName(polices))) -- I am not the police end end -- chat msg here (player, "You called police.") end end
    1 point
  8. I wanna ask is there a sorting system in gridlist?
    1 point
  9. There is also a for ... do in that code which is looping through the exact same element type. Not much of a difference.. Here you got a stripped version: (18+ only) local players = getElementsByType ( "player" ) local aclGroup = aclGetGroup ( "Police" ) for k, player in pairs(players) do local account = getPlayerAccount(player) if not isGuestAccount(account) then local accountName = getAccountName (account) if isObjectInACLGroup ( "user." .. accountName, aclGroup) then -- put your stuff. end end end
    1 point
  10. Thanks a lot Yeah I work on fixes and some more stuff but due to my limited time don't expect anything ground breaking in the next weeks. Also I dont think there will be so much more stuff realized since MTA slowly reaches its limits (especially in terms of performance), in some situations there is so much going on that the single threaded Lua engine slows down even the fastest processors. But the main issue is GTA itself with these inefficient collision calculations. You can destroy any NASA PC just by spawning ~100 Peds that do nothing but stand there, with nothing else going on. It's ridiculous and I hope there will be a fix for this.
    1 point
  11. хз. Ты писал мне или нет, но объясняю еще раз. Есть функция, которая вызывается после покупки автомобиля. Нужно, чтобы после вызова этой функции вызывалась функция из другого ресурса, которая устанавливает номер на авто. А вот какие аргументы посылать - смотреть в номерах. Возможно, придется сохранять данные, чтобы их передавать. Зависит от написанного кода.
    1 point
  12. Is under massive development. Screenshots will be shown when its gonna be released.
    1 point
  13. SUI is making use of dxRenderTargets in order to allow a great functionality of elements that can be parents ( box, scrollbar ). This won't mean it will be laggy, just that the people that have VideoMemoryFreeForMTA couldn't see this type of objects. So there's the possibility of using SUI even if they cannot handle a renderTarget by not using Boxes with more content that they can fit and not use scrollbars at all in this cases. In order to avoid complex code for the developer that is going to use SUI, I'm going to develop a backend that could handle this situations in order to keep as simple as possible the dev's life. Update: RenderTargets maybe aren't going to be used at all!
    1 point
  14. The idea of SUI is creating an API for creating User Interfaces in a easy way by having complex and optimized structures.The personalization is similar to using the dxDraw functions. There are also 'styles' you can add or remove by having a little bit of knownledge of Lua table definition, and about the animations... you should check out the code. The dxLib is estimated to be released on December.
    1 point
  15. Sure, I'm going to. Some pictures: https://imgur.com/a/x4f7w We have many members around, we hope you join too, so we can host more recruitments!
    1 point
  16. أولاً دخلت المنتدى, سألت كيف أسوي مهمة, وهذي المهمة بالتحديد كانت لسي اي تي, ردوا علي بردود غريبة أول مرة اشوفها (فنكشنات وما إلى ذلك) .. بديت ابحث عن فايدتها .. حاولت أسويها .. تبندت من سي اي تي بسبب استغلال بق فلوس .. فشلت الفكرة (يمديك تشوف أول مشاركة لي بالمنتدى) .. بعدها حاولت اسوي سكربت فضاء بنفسي وطلبت فيه مساعدات كثيرة فيه في المنتدى وخارج المنتدى .. حاولت أصلح أخطاء الدي بق .. وبعد عناء طويل السكربت نجح وكان تقريباً اول سكربت لي بس ما عطيته لأحد .. حاولت أروح سيرفرات عرب واقولهم اني ابرمج وكذا .. حاولت اسوي سكربت شات لسيرفر بس ما نجح (وطلبت فيه مساعدات أكثر بعد) .. لكن سرعان ما صاحب السيرفر قلبها معي فقررت أروح طارة (كان من أشهر السيرفرات العربية في وقتها من 2012) عناد الله يعطيه العافية رحب فيني .. وبديت احاول اسوي سكربتات معه ويساعدني واساعده .. وخلال هالفترة تعلمت كثير .. كنت نوب كبير بالأنجليزي لكن مع مرور الوقت أتقنته في قناة الام تي اي للشات لأن تقريباً كل الي فيها أجانب .. صرت اترجم كلمة كلمة ما أعرفها .. ومع الوقت والحمد لله صرت اتكلم بدون مشاكل .. مع إني إلى الحين ماني 100% فيه بعد كل هالسنوات .. ما علينا من هالقصة.. على العموم نرجع لموضوعنا الأساسي .. بعد دخولي طارة بكم شهر حولت على قراند العرب .. تعلمت الكثير في هالفترة من البرمجة .. بعدها صارت مشاكل معهم فخرجت وقررت أسوي سيرفر لحالي .. اخوي جمع لاعبين .. سوينا مجتمع منغلق صغير .. لكن للأسف مع أني بذلت أقصى مجهود ممكن في تطوير السيرفر .. انتهى بالفشل .. حاولت اسوي سيرفر ثاني (((كل هذا لحالي))) ومع ذلك فشل بعد مو لأن المودات كانت خايسة .. لكن لأنه ما كان فيني الطاقة أسوي اكثر من كذا .. وينتهي بي المطاف إلى هذا الحال .. مشرف عام على موقع الأم تي اي وفاقد الاهتمام بالبرمجة. مع ان كل الي كتبته كثير لكن هذي كانت قصتي باختصار شديد جداً شكراً
    1 point
×
×
  • Create New...