Jump to content

Krom

Members
  • Posts

    25
  • Joined

  • Last visited

Everything posted by Krom

  1. Nothing for "player" (but it should counts myself inside the sphere). When checked serverside, the lenght of table is 2 (me and vehicle), when clientside - 0. Nothing for "object" and "pickup", however I couldn't detect them serverside as well (both created dynamically via console command). I'm not too much experienced in everything connected to MTA, but if wiki shows "getElementsWithinColShape - Client and Server function" with one common example of how the function works, then I guess it all should be ok.
  2. No matter even if I do it 1000 of units, that's not a reason of non-working. I wonder why does it give me an empty table ClientSide and fine one ServerSide.
  3. Hello. The task is to check if I have any vehicles nearby and return their names, if any. Here's a code I use in Cient-Side script: aPlayer = getLocalPlayer() bindKey("l","down", function() if isPlayerInVehicle(aPlayer) == false then local playerX,playerY,playerZ = getElementPosition(aPlayer) local col = createColSphere(playerX,playerY,playerZ,5) --Main part begins just below local vehicles_tab = getElementsWithinColShape(col,"vehicle") if (vehicles_tab) then outputConsole("vehicles:") outputConsole(tostring(#vehicles_tab)) for k,v in ipairs(vehicles_tab) do local name = getVehicleName(v) outputConsole(name) end end -- End of check end end ) Line 13 appears, line 14 returns 0 (Zero) to a console, so you may easy guess that line 17 won't get me anything. When run Server-side, the function works well, giving me a list of vehicle names, but I need this running on local client PC and wiki: http://development.mtasa.com/index.php?title=GetElementsWithinColShape says me that It's possible. A bug? Any ideas?
  4. Mainly I'm talking about aircrafts, well only about aircrafts. All of them (planes and helicopters) are strictly limited in their abilitiy to climb above 800 units (metres?). Sometimes it can be avoided by applying some Z-velocity or playing with gravity, so after fighting your plane "gives up" eventually and allows you to keep flying higher in normal way, even throttle returns under your control. But the very first attempt to use your control surfaces at full power makes you feel like a stone: falling down, unable to level-off. I guess it's possible to script a "flight model", that will deal with velocities, angular velocities, gravity, angles of attack etc, taking to account what I've said just above... However tweaking the "height limit" itself could save me from such a headache Talidan, you've suggested me once to report about some xml function that doesn't do what it should, thanks for the advise; do I need to report this one now, or the feature is kinda "useless" and there're no chances to see it implemented in further versions of MTA, or maybe that can be done by myself or whatever..? Rephrasing somebody says "Sky is not a limit", I have to say "It is".
  5. I've been searching for anyone already asked my question, but found nothing, so here's it. I was very happy when discovered that MTA game world doesn't have any limits along the X and Y axes (like SA-MP has), but I'd be 10 times more happy if MTA Team guys could remove the Z axe limit as well (that one which kicks you down when you achieve the altitude of 800 units). I know, this is not so highly important thing to deal with immidiatelly, still could you tell me if there's at least a possibility of removing that "roof". Of course, there're interiors above as far as I know, but aren't they in different dimensions and so on? Hope anybody can give me a nice answer
  6. Can't fight that, it keeps to create new file in "deathmatch" folder.. So there're "resources", Client.dll and that damn "localConfig.xml", which I need to be in other place. Can't believe that nobody ever faced with this. Am I the Chosen One?
  7. Resource folder is "..\MTA San Andreas\server\mods\deathmatch\resources\testmod" Just found that new.xml in "..\MTA San Andreas\mods\deathmatch", however it should be placed in "..\MTA San Andreas\mods\deathmatch\resources\testmod" as far as I understand. Still, can't see what's wrong. Don't have any Cyrillic in folders paths, if that matters. As for xmlUnloadFile - sure, simply missed that in code, it doesn't affect anything, right?
  8. Hello. Here's bit of simple client-side code: default_file = xmlLoadFile("default.xml") new_file = xmlCopyFile(default_file,"new.xml") xmlSaveFile(new_file) The idea is to obtain an exact copy of a "default.xml" file given, and to rename the copy into "new.xml". Both functions returns what they should, means not "false", but nothing named "new.xml" appears in client-side game mod directory. Where's mistake? It's very pity that some functions don't have according examples at MTA-wiki page, so I have to ask for help here. Hope someone can give me such a nice example.
  9. Krom

    GUI Images

    I wasn't mentioned any "needle" and "speed-o-meter" at all, btw The whole point is nothing else than "I need to rotate an image". Anyway, may it be 360 of images for now, till they give us that awesome new CEGUI version.
  10. Krom

    GUI Images

    Now it's clear, thanks. As for that "speedo", DX drawing can help in some cases. But it's useless, if you want to rotate an image.
  11. Krom

    GUI Images

    Don't know if you think it's a very important function to add, but could you give us an ability to rotate GUI static Images? It's boring and abnormal to draw 360 similar images, and then replace them one by one. Having such a nice way to deal with image could make my life much more easier, guys
  12. Krom

    Images alpha

    50p, thankyou. Exactly, I was only interested does MTA "understand" the transparency of images and is able to display them correctly.
  13. Krom

    Images alpha

    Hello, topic says it all. Imagine a black square with white circle inside - a simple png. Can I make that circle to be not the white one, but fully transparent, like you could see what's below the black square through this circle window. Of course I need this while in-Game.. Any suggestions are more than welcome.
  14. Hello. There's such functon listed in MTA-Wiki, but an example is missed. Here's very common idea: when I scrool-up my wheel while keeping mouse at some GUI element (button if possible), I need some variable A to become A + 1, and when I scrool-down, A should become A - 1. If anyone ever saw that function working well, could you give me an example please? Thankyou!
  15. I know. I mean if that's possible to attach one to somebody's vehicle, not just producing tonnes of flares during fox-fight. To use them as a particular element to deal with as you do with other elements, that's the idea. As for Wiki link, I'm surprised, I was looking through all functions, but looks like I wasn't much attentive. Thank you. Exactly. And their LOD duplicates. Have you ever flown around the desert at night? Those light beams are pretty well noticeable to be missed.
  16. Hello MTA community. Maybe someone knows any ways of using those flares in game, because I've found no ways. I'd like to attach it to something, either use as projective, move etc, but I can't even spawn one. it's neither an object, not an element, it's kinda weapon, but you can't take it in your hands for sure. So I wonder if there someone who knows the truth about that "substance". Then, I bet you remember lights over area69, in the desert. They seems to be missed (?currently?). What they are? How to spawn some and, in case of success, will they keep illuminating as bright as those, originally placed at the desert? Last question is: can I remove vehicle collision model, so it could move through everything without hitting and taking damage? Thank you for getting confused together with me.
  17. So such ability can appear once in later versions?
  18. Firstly, Hello. Here's my question (I was looking for such thing discussed here, but found nothing). Is there any ways of setting the draw distance for objects, you've created, spawned by script, or by using *map files? As far as I know the maximum draw distance (DD) for "normal" objects (like trees, road, buildings, anything else) is 300 units (meters?), while there are so called "LOD" objects, which DD is 10 times further. Trying to spawn LOD object, using it's ID gets nothing, means that DD isn't a property or particular LOD model; it only spawns low-quality prototype of "normal" object, less detailed, worse textured, but still disappearing when I'm 300 meters far. Well, there's no such ability for tweaking it, I've found, so can I ask if somebody know something about that? Would be pity, if it's unbreakable MTA limitation, because approaching airfield on jet if difficult, when you see the runway only when you get really close to it...
  19. Thanks for your replies, however I definitely don't need ALL objects to be in one dimension. By the way, I've heard somewhere about some kind of limits for maps, so making them very big may (will) cause you to fall through the ground and so on. Is that true? As for script, I think I can simply use Mr.Hankey's example with checking objects by their coordinates or other options before setting dimensions. But why not to deal with XML too Sure once I'll need it's features much.
  20. Believe me I need it to be so far away. I doesn't talk about just one city. And I need water there as well. But that doesn't matter if I can make islands visible in different dimensions. Could you explain me in a couple of words how to reach that result? You're talking about XML features, but I've began to explore MTA features not so long ago, so don't know much. Help would be so good. Still, thank you for saying it's possible. That solves second problem as well.
  21. Hello, does anybody know if It's possible to set the dimension of *map file. In other words, when you change dimension from 0 to any other, every map objects disappears (those which set by *map file; haven't tried with dynamical spawn of objects yet). So how can I set *map to exist in, let's say, dimension 1, so when player change his dimension to 1, objects appear and when he change it back to default 0, they disappear. One more question. When I get far away from SA mainland (coordinates like 100 thousands by "X", even for 50K it's already noticeable) player model begins to shake or something like that. Effect's getting stronger while moving further from SA, and it's really annoying. Anyone ever being affected by this?
  22. Thank you much, tma. Second one is just the one, I need. I thought that "Source" would be enough to get function know which one vehicle am I thinking about. By the way, can I do the same check in case of uncontrolled vehicle, if I have e.g. 10 vehicles and need to check which are on ground at the moment. Oh, one more, there's no way to make it work with elements (non-vehicles), right? Thought about making some aero-bombs, to put them in rustler.
  23. ^ The function brings me headache, that's the problem. This: function Test(thePlayer) v=isVehicleOnGround(source) outputChatBox(tostring(v)) end addCommandHandler("g", Test) always returns "false", doesn't matter am I driving a car along the street, flying the helicopter or plane, taxiing it to takeoff or jumping down from Chilland in my infernus. Nothing matters. Then, I wonder why, but replacing Command Handler with Event Handler like: addEventHandler ( "onClientVehicleEnter", getRootElement(), setTimer(Test, 1000, 0 )) floods chatbox with "false" even when I'm out on any vehicles, but just spawned after reconnect. That's just two examples among 10 I've performed to reach better result. No success. Has anyone ever tried the function in work? I'm getting strong feeling that function just broken either non-finished or bugged or whatever else. Would be glad to listen to some nice advices here. Thank you.
×
×
  • Create New...