Jump to content

Wojak

Members
  • Posts

    321
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by Wojak

  1. all global variables (including functions) are shared between all the files of the same side within a resource so if you craete a function in client1.lua there should be no problem with calling it in client2.lua exports are for sharing functions between resources
  2. local w, h = guiGetScreenSize( ) screenSrc = dxCreateScreenSource( w, h ) addEventHandler( "onClientPreRender", root, function() dxUpdateScreenSource( screenSrc ) dxDrawImage( w, 0, -w, h,screenSrc ) end ) now it's ok, I've misplaced one "w" (my rear view mirror script is a prove...)
  3. nice, bud using shaders to flip the image is little overpowered local w, h = guiGetScreenSize( ) screenSrc = dxCreateScreenSource( w, h ) addEventHandler( "onClientPreRender", root, function() dxUpdateScreenSource( screenSrc ) dxDrawImage( 0, w, -w, h,screenSrc ) end )
  4. In theory it is possible using the current MTA functions, lua and maths. We have the element matrix (3D coordinates and 3 rotation vectors) We have the element bounding box – more or less the shape of the element and with is surface and volume we have the moveObject function, that allows us to change the element matrix in any way within given time interval (minimum 50ms) so we can make relatively smooth acceleration simulation we also can assign any abstraction data (such as mas) to the element using setElementData and of course using the above data we can calculate collisions between the elements and active forces unfortunately there would be lag with large number of the elements and maybe some sync problems...
  5. Resource news! - resource is updated to mta 1.1.+ (I think most users already did it using the /upgrade command – if so you don’t need to download the new version) - TUTORIAL VIDEO! – available in the opening post
  6. i've meant, when you target the building standing next to it, you will get coordinates inside the building, i don't know how this sctipt will be used, so i din't know is that good or bad... other than that this is definitely not a complex math
  7. x2, y2 = getPedTargetCollision ( getLocalPlayer ( ) ) if not x2 or not y2 then return end local distlimit = 16 local x1, y1, z1 = getElementPosition ( getLocalPlayer ( ) ) local realdist = getDistanceBetweenPoints2D(x1,y1,x2,y2) local percdist = distlimit/realdist local x = x1 + percdist*(x2 - x1) local y = y1 + percdist*(y2 - y1) local z = getGroundPosition ( x, y, z1 + 10 ) of course it may be wrong if the obstacle is closer than 16 units...
  8. Wojak

    Colshapes

    Development is on hold - debug problems, sorry http://imageshack.us/photo/my-images/19 ... 75358.jpg/ http://imageshack.us/photo/my-images/68 ... 03940.jpg/
  9. I would like awoid conflict with other resources that modify textures... Anyway the resource is released so I think this topic may bi locked All comments and suggestions should be posted here: viewtopic.php?f=108&t=35931
  10. You may activate it using the /rearview command, or pressing the "vehicle_look_left" control (“q” key by default) this settings can be changed only in lua file for now This resource started as a concept script, and it still is one, you’re welcome to use the parts of the code as long you mention me in the credits (this method can be for example used to make a security camera resource, where you can watch multiple places at once) In order to create the illusion you’re seeing multiple compromises had to be made, so thete is a list of known problems: - camera is in locked position, you cant manipulate it using mouse nor to change view – fixing this will require to recreating the camera movement handler from scratch, the only way I know to detect the mouse movement is to show the GUI cursor and that may lead to other problems - fps is lowered by half, in order to have 25 FPS you need 50 fps (it don't effect the game speed though) - inpasible to fix as camera can not be at two places at the same time - default GTA hud is disabled manually using showPlayerHodComponent as you would not be able to read it properly - inpasible to fix as far i know - unwanted sound effects (engine sound volume changes rapidly) - inpasible to fix - problem with nametags and other "3D" created by using dx functions - they are flickering and allocating (illusion of being in two places at the same time) - inpasible to fix (without editing nametages cod, and any other script by that matter) - I’ve disabled the mirror in planes Old video: DOWNLOAD: https://community.multitheftauto.com/index.php?p= ... ls&id=2870
  11. i think i've tried everything... problem - you can not capture the hud components into the screenSource... and i know why the first video sucked so badly - the server fps limit was 35 FPS and the fraps recording was set to 25 FPS New video is in the first post i think release it tomorrow - just need to check if i did not messed up something when cleaning the code ps: it looks good on all resolutions
  12. the screen source is now created with the size it is displayd, i've also changed the event to prerender and disabeled the radar manualy (as it was blinking) and ofcourse managed to fixed one problem - guess which i still need to check how it looks on different resolutions, and it can be released
  13. -intel core quad Q9300 2,5GHz -NVIDIA GeForce GTX 295 -4 GB ram -Windows 7 -full hard drive -inefficient recording program - can't remember when was the last time i reinstall the system but it must be more than two years sadly as far i know i would have to recreate the camera movement handler from scratch, and the only way to detect the mose movement that i know is by turning on the GUI cursor... the problem is that GTA can support only one camera, and camera can be only in one place... in order to create an ilusion of having two cameras, it need to swich its position every frame and update each of the two screens every second frame... this video has about 30 FPS, so you seeing only the lousy 15, as long you can get smooth 50 frames it should be ok things i can add: - command to toggle it - relative mirror size (i need an advice how big it should be) - increased view range in the mirror (fisheye effect) - position of the mirrio adjusted to the vehicle size (this may take time)
  14. New video: Old video: this is a concept script, currently there are few problems with it: - camera is in locked position, you cant manipulate it using mouse nor to change view - not resolved - fps is lowered by half, in order to have 25 FPS you need 50 fps (it don't effect the game speed though) - inpasible to fix - i dont know how to simulate a reflection - flip the image - change the left side with the right - resolved - default GTA hud is disabled -it has nothing to do with showPlayerHodComponent... - it's now disabled manually using showPlayerHodComponent - inpasible to fix as far i know - unwanted sound effects (engine sound volume changes rapidly) - inpasible to fix - problem with nametags and other "3D" created by using dx functions - they are flickering and allocating (illusion of being in two places at the same time) - inpasible to fix (without editing nametages cod, and any other script by that matter) this problems are not likely to be solved, if some of you think that it should be released as it is, let me know Resource is released! All comments and suggestions should be posted here: viewtopic.php?f=108&t=35931
  15. mat/lua is case sensitive... there is a diference betwean: markerS and MarkerS...
  16. Wojak

    Definitions

    put the teleporteditor.zip file to MTA/server/mods/dethmach/resources (or MTA/server/mods/dethmach/resources/[editor]) it should be only in one localization, else it will not work (so if you added it in many places you should delete it) than fallow this instructions: when you create the map you will find it somewhere in the resources folder (I did not created a new map in 1.1 yet, so I don't know exactly... )youre map will be a folder, not a zip file, meta.xml will be in that file. Open it with the notepad and add the line @solidsnake please read the first post carefully including the posted links before “helping”...
  17. Wojak

    markers

    All you want and no scripting! https://community.multitheftauto.com/ind ... ls&id=1960
  18. Making the setPedControlState function server side would not solve the problem, when you use the function on the client that is a syncer of an element, the element (ped, vehicle)will be synced (have the same position, animation and velocity)for all clients regardless to ping or fps. The problem lays in SYNCING RANGE and that is 140m for vehicles ans 100m for pedestrians. Elements outside that range are not synced, velocity position and animations are not updated for other clients... When the element find itself in the range again, it will “jump” to the last synced position... I doubt that the range will be increased someday, the current may seam shout, but I think its good enough compromise between the quality and performance... one more thing: functions like setElementPosition and moveObject are forcing the elements position to update even outside the syncing range
  19. Nice idea but you could set the camera matrix at the cameta object position and facing the direction the camera object is facing at the frame when the screenSource is updated
  20. thank you for the interest and for the extra motivation the tesource is not finished yet, i need to find some free time... but what exactly do you mean by "add it to the Map Editor officially" the resource is planned ass aeditor plugin with its own map file interpreter (just like the TeleportEditor), curently 1 collshape is represented by two diferent elements in the map file, wont that be a problem?
  21. Wojak

    peds for mta

    making the beds that walk around the city is not a problem, but making them react to player and vehicles with a good performance is... this is my old resource that i recently released,only peds, no vehicles, peds use animations to walk, they can see only vehicles, and only one at the same time, it onnly works for race mod and all peds and waypoints must be manualy added to the map using the mep editor (i would make it in diferent way today...) viewtopic.php?f=108&t=34750
  22. You are missing an important point... peds are synced only if there are at lest within 100 m radius from any player vehicles are synced only if there are at lest within 140 m radius from any player source: https://wiki.multitheftauto.com/wiki/SetElementSyncer if the element is not synced seting the velocity won't have any efect nor the collshape events will be triggered... (setting the element position or attaching element to an object and moving the object will work though) also if the element is synced setPedControlState shuld onnly be used on the syncer client (you may use onElementStartSync, onElementStopSync events or getElementSyncer function to get this client and trigger a proper clientside event)
  23. maybe counting the tick's between "onVehicleDamage" events calls (if the delay will be les then 50ms its likely that vehicles collided with each other). Who hit who could be detected comparing the vehicles positions and velocity vectors... but this is just a theory
×
×
  • Create New...