Jump to content

Leaderboard

Popular Content

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

  1. download it here https://github.com/rivor/dayz-mta screenshots http://prntscr.com/heso7h http://prntscr.com/hesp1n http://prntscr.com/hesp9l http://prntscr.com/hespjo http://prntscr.com/hesqgu http://prntscr.com/hesqqz http://prntscr.com/hesrb8 http://prntscr.com/hesrhg http://prntscr.com/hesrqh http://prntscr.com/hessgx http://prntscr.com/hested
    2 points
  2. 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
    1 point
  3. spawnVehicle é uma função nativa do mta e não pode ser usada para nomear funções Existem duas funções para o evento "onMarkerHit" uma só tem a output, e a outra tem o erro já mencionado acima, junte numa só função Certifique-se que o jogador não esteja em um veículo em "onMarkerHit" Verifique se o veículo do jogador corresponde ao veh[player] em 'destroyM' Não precisa usar isElementWithinMarker no evento "onMarkerHit", não perca tempo fazendo isso, o player sempre estará na marker quando atingi-lá.
    1 point
  4. Shocking news, the official owners has returned so therefore the server has a password we are doing some major server updates we are like 95% done with them , just waiting some works from our mappers and designers. join our discord to stay updated>https://discordapp.com/invite/kCKy4KV<
    1 point
  5. local isDxShowing = false function drawDX() dxDrawImage(650, 82, 520, 522, "painelpmerj.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawRectangle(852, 255, 117, 24, tocolor(0, 0, 0, isCursorOnElement (852, 255, 117, 24) and 200 or 110), false) -- Retângulos que ficam com alpha em 200 quando o mouse está em cima. dxDrawRectangle(852, 289, 117, 24, tocolor(0, 0, 0, isCursorOnElement (852, 289, 117, 24) and 200 or 110), false) dxDrawRectangle(852, 323, 117, 24, tocolor(0, 0, 0, isCursorOnElement (852, 323, 117, 24) and 200 or 110), false) dxDrawRectangle(852, 357, 117, 24, tocolor(0, 0, 0, isCursorOnElement (852, 357, 117, 24) and 200 or 110), false) dxDrawRectangle(860, 401, 101, 22, tocolor(0, 0, 0, isCursorOnElement (860, 401, 101, 22) and 200 or 110), false) dxDrawText("Farda 04", 852, 357, 969, 381, tocolor(255, 255, 255, 200), 1.00, "default-bold", "center", "center", false, false, false, false, false) dxDrawText("Farda 03", 852, 323, 969, 347, tocolor(255, 255, 255, 200), 1.00, "default-bold", "center", "center", false, false, false, false, false) dxDrawText("Farda 02", 852, 289, 969, 313, tocolor(255, 255, 255, 200), 1.00, "default-bold", "center", "center", false, false, false, false, false) dxDrawText("Farda 01", 852, 255, 969, 279, tocolor(255, 255, 255, 200), 1.00, "default-bold", "center", "center", false, false, false, false, false) dxDrawText("Fechar", 860, 399, 961, 423, tocolor(255, 255, 255, 200), 0.90, "default-bold", "center", "center", false, false, false, false, false) end function gerenciaPainel () if isDxShowing then removeEventHandler ("onClientRender", getRootElement(), drawDX) showCursor (false) isDxShowing = false else addEventHandler ("onClientRender", getRootElement(), drawDX) showCursor (true) isDxShowing = true end end addEvent ("ativaPainel", true) addEventHandler ("ativaPainel", getRootElement(), gerenciaPainel) addEventHandler ("onClientClick", getRootElement(), function (button, state, absoluteX, absoluteY) if (button == "left") and (state == "up") and isDxShowing then if isCursorOnElement (860, 401, 101, 22) then -- Fechar gerenciaPainel () elseif isCursorOnElement (852, 255, 117, 24) then -- Farda 01 outputChatBox ("pegou farda 01") elseif isCursorOnElement (852, 289, 117, 24) then -- Farda 02 outputChatBox ("pegou farda 02") elseif isCursorOnElement (852, 323, 117, 24) then -- Farda 03 outputChatBox ("pegou farda 03") elseif isCursorOnElement (852, 357, 117, 24) then -- Farda 04 outputChatBox ("pegou farda 04") end end end) -- Esta é uma Função Útil function isCursorOnElement( posX, posY, width, height ) if isCursorShowing( ) then local mouseX, mouseY = getCursorPosition( ) local clientW, clientH = guiGetScreenSize( ) local mouseX, mouseY = mouseX * clientW, mouseY * clientH if ( mouseX > posX and mouseX < ( posX + width ) and mouseY > posY and mouseY < ( posY + height ) ) then return true end end return false end
    1 point
  6. It seems there's certain conflict between MTA:SA and Nahimic 2+ Audio Driver. [Lag only appears when the mentioned program is on]
    1 point
  7. FINALLY We did it , we fully released 5.0 and the server is now up and running , we are waiting you all
    1 point
  8. Ah Finally its that time of the year "end-of-year" where i release some huge updates this time we didn't just release updates we updated the server to 5.0 Visit To see our latest stuff - doesn't disappoint
    1 point
  9. getPlayerFromName getPlayerAccount isObjectInACLGroup getAccountData outputChatBox addCommandHandler
    1 point
  10. Huge update coming stay tuned.
    1 point
  11. New forums released http://saegrpg.com/ Take a look
    1 point
  12. Another day We are waiting you guys
    1 point
  13. تقدر تسويلي ياها ع لوحة عادية عشان اشوف اكوادها ؟و اعرف كيف طريقة عملها يعني
    1 point
×
×
  • Create New...