tma Posted March 29, 2008 Share Posted March 29, 2008 Hey. Being programming in MTA:DM for a while and have come up with some questions/issues/suggestions ... 1. Could getColorFromString() be made client-side also ? 2. Could timers be given unique handles ? I've been writing a fairly complex script and ran into a bug based around timers. What I didn't realise is that timer handles are re-used. I know there are ways round this (I implemented one but am about to rewrite it) but how about a thin new layer of code that makes sure a new timer handle is unique ? (Like a GUID). This would stop any kill timer issues and shouldn't impact existing code - timer handers aren't manipulated in anyway and are only used for reference. It might kill unknown/unforseen issues for others too. 3. Any chance of an isVehicleOnWater() function ? (client side). I think I can implement something in a script but maybe this would be handy for others ? 4. I don't suppose isVehicleOnGround() will ever support dynamic objects ? i.e. if I make a road section and drive on it, this function won't (currently) return true. 5. Could the constraints for vehicle-to-vehicle attaching or trailer hookups be variable ? i.e. vehicles unglue and trailers detach quite easily (at speed). Is there a way to set the "grip" between the two ? It's just that in SA-MP I've played around on a server where the trailer wouldn't unhook at all until requested. 6. I noticed pickups don't show when you're off the main world map. They're still there and work but aren't visible. Is this an MTA or GTA limitation ? 7. How does the road affect velocity ? I've written a car speed booster which works fine - I set my upper limit to say 200mph and the car accelerates to it. However, when I hit certain areas, the speed caps (or drops down). For example: on a railway line the car won't go over ~140mph. On the large bridges the speed is again capped. 8. Is there any way of making the hay bale indistructable ? Sorry for the long list but I've been saving them up! Link to comment
Ace_Gambit Posted March 29, 2008 Share Posted March 29, 2008 6. I noticed pickups don't show when you're off the main world map. They're still there and work but aren't visible. Is this an MTA or GTA limitation ? I reported that issue not long ago viewtopic.php?f=94&t=22000 and I was still hoping someone could tell me if that's MTA or GTA related. It is a pretty annoying bug because the map I am currently working on is like 7000 units over x and 7000 units over y outside off the main map world. It should be noted that pickups show up fine when I load the map in the race mod. Link to comment
tma Posted March 29, 2008 Author Share Posted March 29, 2008 6. I noticed pickups don't show when you're off the main world map. They're still there and work but aren't visible. Is this an MTA or GTA limitation ? I reported that issue not long ago viewtopic.php?f=94&t=22000 and I was still hoping someone could tell me if that's MTA or GTA related. It is a pretty annoying bug because the map I am currently working on is like 7000 units over x and 7000 units over y outside off the main map world. It should be noted that pickups show up fine when I load the map in the race mod. That's because he's manually making them - as I am now. The pickup positions are sent to the client where their made using models and a collision zone - not actual MTA pickups. I'm assuming arc_ (?) did this because of an MTA/GTA limitation. Link to comment
Mr.Hankey Posted March 29, 2008 Share Posted March 29, 2008 4. I don't suppose isVehicleOnGround() will ever support dynamic objects ? i.e. if I make a road section and drive on it, this function won't (currently) return true. if you just want this for a client side script you could use processLineOfSight or isLineOfSightFree to get the z height of the object under the car and then check if the difference on the z axis between the car position and the road is higher than GetElementDistanceFromCentreOfMassToBaseOfModel. Dunno if this would work it's just an idea =) Link to comment
tma Posted March 29, 2008 Author Share Posted March 29, 2008 Yep, that was my plan (and testLineAgainstWater() for the isVehicleOnWater() check). It was just as I was about to begin coding these that I wondered wether or not they should be an API function and therefore usable and consistent for all coders (not that you couldn't release a resource with scripts in of course). Link to comment
Recommended Posts