Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 08/10/19 in all areas

  1. For long time i considered to do something with physics in mta. For now doing even simplest things such falling box, tree on flat area looks cartoonish. In my history of i saw few attempts of doing simple physics, mostly it was in closed area without bigger interactions with poor performance due you just can't calculate collision in other way than processLineOfSight, isLineOfSightClear or read directly .col file as Tederis did. I started with something to render things, thats how FBX https://github.com/multitheftauto/mtasa-blue/pull/1093 to bypass default rendering to handle future i'll introduce in future. That's how bullet physics project born, first idea how to use react physics, works simillar but is lighter and general smaller project but 0x416c69 suggested to use bullet. I'll use this topic also to prepare long list of features it contains for future copy paste to PR and wiki page The main assumption is to allow for create multiple world with completly independed simulations, get and set detailed information about current step of simulation, fully control how everything is simulated, quality of collision tests, speed and a lot more. i'm trying keep amount of functions low, because if that most stuff is packed into one function. Syntax and name of some function might change in future or along suggestions. Not all properties supports every physics element, some are only get, other set only, however most of them are set/get Current stage: I already implemented function such a: physics physicsCreateWorld() - responsible for creating new world for simulations, return element which will use later. physics-rigidbody physicsCreateRigidBody( shape-type, mixed arguments ) - creates rigid body which is use to simulation bahaviour of non-static shapes, collisions ( currently only few models in mta can do this in simple way ). physics-rigidbody physicsCreateRigidBodyFromModel( model ) - used to create rigid body directly from collision data taken from gta model. physics-static-collision physicsCreateStaticCollision( shape-type, mixed arguments ) - creates static collision which will not move at all ( it is still possible to move it by Lua script ) physics-shape physicsAddShape( shape-type, mixed arguments ) - if you create compound shape, this function let you add more shapes into static collision or rigid body bool physicsSetProperties( any physics element, physics-property, mixed arguments ) - main function to control physics, rigid bodies, static collisions, shapes. Works in simillar way as handling functions. mixed physicsGetProperties( any physics element, physics-property ) - same as above, but getting properties bool physicsDrawDebug( physics ) - use to visualization of world, must be used in render function bool physicsSetDebugMode( physics-debug-mode, enabled ) - use to turn off/on debugging features bool physicsBuildCollisionFromGTA( physics ) - used to create static collisions in specified world from original collisions, doesn't create whole world instantly, require to move player around world to load collision data. physics-constraint physicsCreateConstraint( physics, physics-rigid-body, physics-rigid-body, constraint-type, mixed arguments ) - use to connecting two or more rigid bodies into one entity bool physicsApplyForce( physics-rigid-body, vector from, vector to ) - pushing rigid body in particular point you choosed. bool physicsApplyCentralForce( physics-rigid-body, vector direction ) - apply force from central position of rigid, it's more like "accelereate", should be used more than once at the some period of time bool physicsApplyCentralImpulse( physics-rigid-body, vector direction ) - setting position from center of rigid bool physicsApplyDamping( physics-rigid-body, float force ) - i'm not sure, but it should slow down velocity and rotation of model by specified amount of units physicsApplyImpulse( physics-rigid-body, vector direction ) - i'm not sure how it works physicsApplyTorque( physics-rigid-body, vector rotation ) - same as physicsApplyCentralForce but for rotation physicsApplyTorqueImpulse( physics-rigid-body, vector rotation ) - setting rotation speed physics-properties: "mass", "position" ,"rotation", "sleepingthresholds", "restitution", "scale" "debugcolor", "filtermask", "filtergroup", "stiffness" `sleepingthresholds` means how slow rigid must move/rotate to sleep, it makes stops moving at all but still can be pushed by other rigids `restitution` bounciness, between 0-1 but accept any value above `stiffness` - for fixed constraint `filtermask` i still figuring out how it work, but should let you use 32 bit mask to set which rigid with which should collide Bullet documentation: https://github.com/bulletphysics/bullet3/blob/master/docs/Bullet_User_Manual.pdf page 13 contains useful information when which shape should be used physics-constraints: "pointtopoint", "hidge", "fixed", "slider" Physics-shapes: "box", "sphere", "capsule", "cone", "cylinder", "heightfieldterrain", "compound", "trianglemesh", "convexhull" `compound` is used for constructing rigid made of various shapes Plans for future: "heightfieldterrain" shape type accept black-white texture for faster creation Support for cloths, soft bodies Media: Videos are availiable at my youtube channel https://www.youtube.com/channel/UC95MpsQ1JppDNpMvl_7c1rg screenshots and gifs of current progress: Documentation i use: https://pybullet.org/Bullet/BulletFull I'm waiting for your suggestions Topic not finishedd
    2 points
  2. Because the server isn't aware of the upgrades given in the client side.
    1 point
  3. local Gate = createObject ( 980, x, y, z )---تنشا اوبجكت باحداثيات x,y,z --هو رقم البوابه يعني رقم الاوبجكت الي يشبه البوابه --الحين بنسوي الاوبجكت الي تبيه اللي لما يضغط عليه يفتح ال gate local obj=createObject ( 1024, x, y, z ) --x,y,z زي ما قلنا الاحداثيات --بالمناسبه الاحداثيات تقدر تجيبها بامر gp من اف 8 لو انت مشغل الf1 اليي يجي مع اللعبه local StateObject = true addEventHandler( "onClientClick", getRootElement(), function (button, state, _, _, _, _, _, clickedElement)---ضفنا حدث لما اللاعب يضغط if ( button == "right" ) and (state == "down" ) and ( clickedElement == obj ) then --الحين نتحقق لو اللاعب ضغط على الاوبجكت نفسه اللي هو 1024 ولا لا وهل ضغط بالماوس باليمين ولا لا وفي شي متقدم شوي قدام بتحتاج تفهمه state لو بتشتغل دي اكس وكذا if ( StateObject == true ) then --الحين اتحقق هل الباب مفتوح ولا لا عن طريق متغير انا مسويه اصلا local x, y, z = getElementPosition ( Gate )--الحين اجيب احداثيات الباب moveObject ( Gate, 1000, x, y, z +5 ) --احرك الباب 5 درجات تحت الارض بحيث يختفي -- guiSetVisible(YourWindow,true)--لو تبي تخفي لوحه StateObject = false -- الحين اقوله الباب حاليا مفتوح setTimer(function () moveObject(Gate,6000,Gate, 1500, x, y, z )-- انزل الباب لمكانه الاصلي اللي هوا x,y,z اللي انشات فيهم الالمنت في خلال 6 ثواني اللي هي تسواي 6000 ملي ثانيه setTimer(function() StateObject=true end,6000,1)-- الحين حطيت تايمر بحيث لما الباب يسكر نهائي اقوله خلاص الباب مسكر يقدر يضغط عالالمنت ثاني عشان يفتحه end, 1000*2, 1, ) -- حطيت تايمر بحيث بعد ثانيتين يبدا ينزل الباب end end end ) -- الماوس ---الحين محتاج يظهر الماوس bindKey("o","down",function()-- اضيف بايند للحرف اوه O بحيث لما يضغط عليه مره يظهر الماوس ولو الماوس ضاهر بيخفيه showCursor(not isCursorShowing ()) --هذا الكود يتحقق لو الماوس ظاهر راح يخفيه لو مب ظاهر راح يظهرلك الماوس end) اتمنى اكون افدتك بالتوفيق في بعض الاختلافات يا غالي مع طلبه حاول تساعد بدون عصبيه وشكرا
    1 point
  4. In the beginning, the script had hungarian variables, and probably didn't rewrite it. I fix this, thank you.
    1 point
  5. thanks for help, I'll try to understand
    1 point
  6. The crash is inside CEF We are looking into it
    1 point
  7. I just looked in to your source code, because I got curious. (I haven't tried the resource, no time for now) But the variable alapLo, where is it defined? Just wondering. Anyway, keep up the nice work!
    1 point
  8. To be honest, I haven't encountered any issues with it yet. But I am pretty sure that it can have issues when memory has been wiped because of an <unknown situation>. I would suggest following Awang his suggestion: If applied, you probably do not need that onClientRestore event. It might also improve performance, because it is static. local texture = dxCreateTexture(dxGetTexturePixels(rt)) dxSetShaderValue(theShader, "gTexture", texture)
    1 point
  9. Mid Game Map Voting (I hate it lol) Great work on the server Ein, your work here deserves more credit. I do have some major issues though, if you would be so kind as to hear them out? Mid game map voting : This is becoming a huge downside to playing SAAW, for the following reasons : > When you are actually winning a battle.... Losing teams often Map Vote throwing away all your hard work, I don't think this needs further emphasis on why this is frustrating and unfair. > Being robbed of ever buying top tier vehicles / restocking ammo trucks etc .. There is nothing worse than having your hard earned $$$ taken from you due to a Mid Game Map Vote, this way the hardest working players are forced to change map and lose everything. You are forced to limit you class choices in this situation also, as to harvest more $$$, top tier vehicles have been removed from most of the maps they once featured in, making this losing grind factor sting even more. > Even when you are losing.... One of the greatest victories one can achieve is that when you turn the tide of battle. You are losing the match, but your luck changes, you and your team mates rally together moral strengthened only to have your turn of good fortune snatched away by a random Mid Game Map Vote. >Losing players in the server .... I'm sure anyone who plays SAAW will agree that most players exit the server due to to a Mid Game Map Change, I play pretty much every day, and see this happen, and i'm certain the above examples are a factor to this. What solidifies this is when mass players exit the server, just the other day we had over 20 players, after the match was interrupted, most of the players left, leaving only 5, including myself. I guess the only argument against removing Mid Game Map Voting is the options available : You have the choice to change the map or press "0" not to change, this however is ultimately flawed, a unified vote that would make the majority of players happy does not exist here, as everyone chooses something different resulting in a minority vote or random conclusion. There is nothing wrong with having multiple choices in this regard, as long as they are required and function in a satisfactory manner. We all enjoy the server, and we all want to have fun. Actually getting to finish a match is very rare now, the post battle screen where you choose your next battle if far more democratic and satisfies everybody. If anyone agrees or disagrees please comment But I do hope we all can agree that this MId Game Map Voting system is redundant and had it's day. Thank you. Punzer Wulf. I forgot to mention, will the Draw Distance issue be fixed anytime soon? Thanks
    1 point
  10. I come to provide a shader that eliminates blood. this resource serves specifically for roleplay servers that want to add modified heads, allows that when using the function 'setPedHeadless' the blood can not be seen and is comfortable to place them. Be careful, this eliminates blood in all aspects, even in shots. Apologies for bad English, I used a translator. Image: https://imgur.com/fwy82qI Download link: https://community.multitheftauto.com/?p=resources&s=details&id=15929
    1 point
  11. Very nice !! Best Free Script of Cinema !! Thanks You By Cinema Script !!
    1 point
  12. Thanks by here resource beatiful !! Love Cinema !!
    1 point
  13. Amazing script! I really loved it, i already tested it. Everything is working but seems there's something annoying When i press on the button to move to a playlist, it doesn't do it, it pops-out a message saying "Connection Timed Out - Couldn't reach API" I hope there's a solution for this. Good work for making this script, can't wait to see the final version!
    1 point
  14. عاشق الشرق 2010 - 2014 وداعاً ، اذكروني بالخير سبحانك اللهم وبحمدك اشهد ان لا اله الا انت استغفرك واتوب اليك
    1 point
×
×
  • Create New...