Jump to content

patriot

Members
  • Posts

    31
  • Joined

  • Last visited

Everything posted by patriot

  1. Suppose I got myself the newest development build, where can I find the new features or functions list of this version so I can test it?
  2. Hi Blokker, what do you mean by 'new community'? Also, I'd like to know if there is any chance to see a new client version of MTA SA soon. Thanks!
  3. Should I simply use this in any server-side resource, without first exporting it to the client-side part of the entire resource? Do I need to use the "exports" thing in the client-side part of the resource before triggering it using triggerClientEvent?
  4. Hi there, I've got a client-side function that I export to other resources. Everything is fine, until I need this function to be triggered by serverside event. When I want to export this clientside function to clientside resource, I simply use this: exports["text"]:showText("My text", "4000", 20 ) But what should I do if I want to "showText" to "thePlayer", by serverside? function getPosition(thePlayer, commandName) local x, y, z = getElementPosition(thePlayer) local rotation = getPedRotation(thePlayer) local dimension = getElementDimension(thePlayer) local interior = getElementInterior(thePlayer) outputChatBox("Position: " .. x .. ", " .. y .. ", " .. z, thePlayer, 255, 194, 14) outputChatBox("Rotation: " .. rotation, thePlayer, 255, 194, 14) outputChatBox("Dimension: " .. dimension, thePlayer, 255, 194, 14) outputChatBox("Interior: " .. interior, thePlayer, 255, 194, 14) end addCommandHandler("getpos", getPosition, false, false) I want to use my exported clientside function inside the function above. In what way exactly can I do this?
  5. Okay then, I will simply handle a dxDrawText with no text at all ("") and change it everytime by setting a varaiable which stores the text. Then I will create a timer to reset the text ("") and I guess problem sorted out. Sorry for being so LUA newbie.
  6. Nevermind, got this already. However, I tried to make the function that I wanted: function dxText( text, timer ) setTimer ( function() dxDrawText ( .... ) end, timer, 1 ) end addCommandHandler("showtext",function() dxGameText("Text test", 2000) end) But the text shows only after the specificed time and then disappears right away...
  7. All I wanted to know. How do I make a bool parameter inside a function? As far as I see when writing a LUA function there is no need to specifcy whether the parameter is a string ot int, but what when it comes to bool?
  8. I put "outPutFunc("Test")" under onClientRender.
  9. I can actually make it myself, but I don't know why that thing isn't working. Once I know what's the error in the following code, I will be able to make what I mentioned above. function outPutFunc(string text) outputChatBox ( text ) end outPutFunc("Test")
  10. Hi guys, I need a clientside function that creates a dxText using parameters, for example: function dxText(string text, local time) Parameters: string text = the text of the dxDrawtext. local time = the time, in milliseconds for setTimer until the text disappears. Basically, the function creates a dxDrawText for a specified time. Thanks!
  11. Got it. What should I put in the vertical?
  12. Hi, so I am trying to draw a dxText on the screen, but the problem is that the screen positions of the dxText are telling where the text is starting from. I want that the screen positions, as in here: dxDrawText("This is a long line in order to present the new text on the screen!", 600, screenHeight - 147, screenWidth, screenHeight, tocolor( 255, 255, 255, 255 ), 1, "verdana", "left", "top", false, true, false, false, true) Will be like that: (http://i49.tinypic.com/2i24oyx.png) Basically, a static text position no matter what's the length of it. I don't want to make a desiered position for each text line, that's the point... Any functions or some kind of help to achieve what I want will be appriciated.
  13. A'lright, I did the trick. However, I am still not sure if I am going to see the same relative position at any smaller / larger screen resolution.
  14. Yes, exactly. How can I do this?
  15. But "screenHeight - 41" is not the same for 1280x720 and, for example 1440x1080, am I right? It's simply 720 minus 41 (as for 1280x720) and 1080 minus 41 (as for 1440x1080) or I completely misunderstood?
  16. Thanks for the information, I appriciate it. One question; what If I want to set static position for the dxText, let's say, not the center, but in the center of the bottom? I want it to show at the center-bottom at any screen resolution, what should I use now?
  17. Another question: How do I get the text to show at the center of ANY resolution? Also, I tried to change the colorCode to true, but when I do this there is no text at all. dxDrawText(playerZoneName, 700, screenHeight - 41, screenWidth, screenHeight, 0xff0000, 1.02, myFont, "left", "top", true) -- Draw zone name text. dxDrawText ( playerZoneName, 700, screenHeight - 43, screenWidth, screenHeight, 0xff0000, 1, myFont, "left", "top", true As in the wiki: bool dxDrawText ( string text, float left, float top [, float right=left, float bottom=top, int color=white, float scale=1, mixed font="default", string alignX="left", string alignY="top", bool clip=false, bool wordBreak=false, bool postGUI=false, bool colorCoded=false, bool subPixelPositioning=false ] ) Did I miss something?
  18. Silly me. It works now, thanks!
  19. Still doesn't work, myFont returns false. Anyone?
  20. If I set damage proof to true, am I still able to blow the vehicle's tires, for example? My goal is only to set the engine health damageproof.
  21. Great! How do I freeze vehicle's engine health when it doesn't get hit in the hood? We already got the way to check whether the hood was hit or not; but is this possible to freeze engine's health without preventing the vehicles frame (inc. tires) from being damaged?
  22. I've got to another idea: Attatching a hidden object to the front side of each vehicle model, then checking if it gets hit (or nearly hit, by distance) Is this possible? If yes, what functions and events would help in this case? Thanks! To make this clear, I want to check when player shoots at any vehicles' bonnet (hood)
  23. Alright, though I am not sure how to check if it hits the engine (mainly the front) area of the vehicle. I'd really appriciate your help!
×
×
  • Create New...