Jump to content

Driggero

Members
  • Posts

    75
  • Joined

  • Last visited

Everything posted by Driggero

  1. Do you mean the shot where his car was being seen from a distance? If so then you can use setCameraMatrix for that
  2. Thanks everyone for the replies. A good friend of mine linked me this resource: https://community.multitheftauto.com/in ... ls&id=7790 Which is everything I needed to make it for my own uses. As CrystalMV said it records the player's pos/rot/vel and stores them in tables. (I don't know what rotation velocity is, this resource doesn't use it and it seems accurate enough). Also it stores the locations every frame, which on my team's server would mean 50 a second. I'll try it out with 10 saves a second and see how fluid the motion is.
  3. Hey guys. Recently a friend and I thought it would be a good idea to make a death replay mode, essentially showing a short replay of how you died. This would be for the Race gamemode and using a kill script I created. My question is simply can it be done? GTA SA had a replay feature built in: http://gta.wikia.com/Replay so I can't see it as being impossible. But whether MTA has any functions that take advantage of that I don't know. Any information you can give me on this would be appreciated
  4. These maps are awesome. Good work!
  5. I think he's talking about the vehicle body parts, not the ped body parts. The best way I found to check this is to write a simple script that outputs what body part you hit in the chat, so you can check where on the car these parts correspond to. addEventHandler("onClientVehicleCollision", root, function(element, force, part) if element then if getElementByType("vehicle") then outputChatBox("Body part was "..part) end end end ) As for the body parts themselves, it seems pretty difficult to tell where they are. Hitting a car head on will often trigger 2-3 body parts at once (i think they were 1,3 and 17). EDIT: you might also want to remove that if statement "if getElementByType("vehicle") then", as that is in there to make it only trigger when hitting other vehicles. Good luck!
  6. getRealTime That's all you need. Check the example for how to use it
  7. The only problem with onClientRender is that it can't be used server side, so he'll need to set the vehicle colour clientside and other players won't see it. Not sure if it's intended that other players see it or not though. Anyhow, timers would work just fine for server side, and onClientRender would be ideal for clientside If he wants a smooth transition between colours (like on FFS) then math.random is useless. InterpolateBetween would work
  8. dxDrawImage interpolateBetween With the event onClientRender
  9. remove the quotation marks around myFont in the dxDrawText function. local myFont = dxCreateFont( "digital.TTF") dxDrawText(getServerTime()[2],textOffsetX+1,textOffsetY * 1.5+1,screenWidth,screenHeight,tocolor(0,0,0,alpha*1.7),1.7*(screenWidth*0.50)/1080,myFont,"left","top",true,true,true) dxDrawText(getServerTime()[2],textOffsetX,textOffsetY * 1.5,screenWidth,screenHeight,tocolor(255,255,255,alpha*1.7),1.7*(screenWidth*0.50)/1080,myFont,"left","top",true,true,true)
  10. Use this: https://community.multitheftauto.com/in ... ls&id=1224 By far the best addon for making moving object scripts
  11. Driggero

    FR Gui Disabling.

    Open the admin panel, find the freeroam resource and turn it off. You can also edit it out of the config file so that it won't start automatically when the server does.
  12. Thanks for the answer! I'm going to use the code I posted (since I only need to send the specific info for that client to them) so hopefully it won't have any problems passing 2 integers to each client via triggerClientEvent.
  13. So I've created a kill script for DD, and after the kills are added to the players account serverside, I want it to trigger an event to send this account data back to the client to be displayed in a GUI. I'm stuck between 2 ways of doing this: I could create a table with ALL the kills of every player and send that client side on the root element. Then filter through this client side for the specific local player. Or I could loop through all the players and trigger a client event for each player sending ONLY their specific account info to them, no one elses. I guess what I'm asking is If I trigger a client event on the root element, is that the same as triggering x amount of client events for x amount of players. In which case it would just be more efficient to send only the players specific info in something like this: for i,v in ipairs(getElementsByType("player")) do local account = getPlayerAccount(v) local killTotal = getAccountData(account, "dd.kills") or 0 triggerClientEvent(v, "onPostFinishClient", root, killTotal) end
  14. OH, you want the ped's health to be set to 0? That makes more sense in that case: addEventHandler("onClientVehicleCollision", getRootElement(), function(hitElement) if getElementType(hitElement)=="ped" then setElementHealth(hitElement, 0) end end )
  15. addEventHandler("onClientVehicleCollision", getRootElement(), function(hitElement) if getElementType(hitElement)=="ped" then theKiller = getVehicleController(source) setElementHealth(theKiller, 0) end end ) Something like that perhaps?
  16. And there's me thinking it would be a few simple lines I'll certainly have a go at trying to make use of the math in your script and convert it into lua. Not very familiar with C++ so we'll see how that goes. Cheers for pointing me in the right direction
  17. Is it possible to take 2 sets of XYZ coordinates from the 3D world and find out the rotation values (x, y, z) needed to move between them. What I'm essentially looking for is this https://wiki.multitheftauto.com/wiki/FindRotation but working for 3D points. I'm using it to create a projectile from the players position to a point they've clicked on with the cursor. I've sussed all the rest of the code so I don't need help with that, just need to know if there's a way to find the rotation between 3D coordinates. Any help would be greatly appreciated!
  18. You'll need to block permissions to the voting commands in the acl.xml just find the group Everyone and set the permission for command.voteredo to false. As for the second point I believe you can change that in the race settings. Open your admin panel and go to resources, find race and double click to bring up settings. Find random maps and set it to false. This may not be the exact thing you're looking for, however there might be publicly available scripts that can do this for you.
  19. Use this instead outputChatBox( "test", localPlayer )
  20. Having played on pretty much all of these I can verify that they are indeed excellent maps. Not only that but between them these guys have made literally hundreds of maps, and never at the expense of originality. As they said this won't be for everyone, but for aspiring DD/ Shooter servers this is a nice little deal
  21. if you're trying to create an anti-flood script, then you might be pleased to know there are already several public scripts in the MTA community that will do the job nicely. https://community.multitheftauto.com/in ... ils&id=202 https://community.multitheftauto.com/in ... ls&id=3284
  22. https://wiki.multitheftauto.com/wiki/Sc ... troduction Start there, and work your way through. If you don't have the patience for it, then perhaps scripting isn't for you, as in some cases it will require a LOT of patience.
  23. Yeah the delayed circular explosion was exactly what I was looking for, I'd have never worked that out on my own thanks very much indeed. I've come across this explosion limit, weren't sure if it was just my local server or if there was an actual limit, cheers for clearing that up too. I guess I'll just set the explosions a little further apart, shouldn't be a problem. Thanks again!
  24. There's a mapping resource called Object Movement Generator (OMG) Available in the MTA community, that will do all the leg work for you
  25. Hi everybody. I'm looking to create a circular path of explosions around the edge of my map. So the explosions will occur on the outer most part of the map and continue round eventually forming a circle. Simply changing the values each time is extremely tedious and not very efficient, so I was wondering if there was a way to map out a path using some of the math functions (perhaps math.sin, cos, etc.). Unfortunately I can't get my head round these functions at all, could anyone offer some help as to whether this is actually possible? And if so how might it be done? Any help would be appreciated as I'm completely stumped
×
×
  • Create New...