lolcatsareawesome
Members- 
                
Posts
38 - 
                
Joined
 - 
                
Last visited
 
Everything posted by lolcatsareawesome
- 
	Hi, I was scripting when suddenly that error appears. I want save a huge string in a var but I got this error and it say to put a min version. I put that on the meta but still not working: <min_mta_version client="1.3.2" server="1.3.0-9.03773"/> If someone have an idea, thanks.
 - 
	Hello, I've an error by using string.gsub because I want to remplace a string by another one but the script think it's a pattern but I don't want a pattern string. The string that I want to remplace is ")" to " ". With string.find per example, he have an argument for disable the pattern. local theString = "lolcats)are)awesome"; local result = string.gsub(theString, ")", " "); outputChatBox(result) The error that I've is "Invalid pattern capture".
 - 
	Some errors in your code but you understand what I mean. GUI focus isn't the good way to do that. Based on your idea, I find the solution. isGui = false addEventHandler("onClientMouseEnter", getRootElement(), function() if source then isGui = true; end end) addEventHandler("onClientMouseLeave", getRootElement(), function() if source then isGui = false; end end) Thank you !
 - 
	I think you don't understand what i'm talking about. I'll try to explain more... (forgot the blowVehicle thing) As you know, the event onClientClick is actived when the user click with his mouse. This event give us a parameter, that parameter is an element. This element is the element where the player clicked on GTA world. This element can be vehicle, player, object etc. The fact is that, when I open any GUI and click on it (example: admin panel), the onClientClick still running. (Using the admin panel example, I want to press a button, unfortunly, a vehicle is at the same place in my screen. Then the event onClientClick will detect that click.) The element that onClientClick returns is a MTA element but it works only for vehicle, player, objects etc not GUI elements (As far i know, GUI elements are MTA elements: https://wiki.multitheftauto.com/wiki/Element ) How can I know if the player click in a GUI element or in a element in the GTA world? I hope you understand guys...
 - 
	addEventHandler("onClientClick", getRootElement(), function(button, state, x, y, wx, wy, wz, element) if (button == "left") and (state == "down") then if element and (getElementType(element) == "vehicle") then blowVehicle(element) else -- CHECK IF THE ELEMENT WHERE THE USER CLICK IS A GUI, IF IT'S THEN DO NOTHING end end end)
 - 
	You don't understand my previous post.
 - 
	Hi there, I've made a script when the player click on a vehicle, the vehicle is destroyed via the event onClientClick. The problem is that, when the player open a window (admin panel per example) and do his stuff into it, the event onClientClick continue to do his things. I want to limit it, when the player click in a GUI, onClientClick doesn't do anything. The element argument from onClientClick doesn't detect the GUI elements. It allways return false. Thanks for your help !
 - 
	Oh thanks.
 - 
	Hi there again, I want to know if it's possible to call a function with his name as a string. Per example i have: function myFunctionName() end and in another part of my code, I've: local theFunction = "myFunctionName"; It's possible to call the function using theFunction() ? Thanks.
 - 
	Of course. The dxGetTexturePixels return a string that contain the texture as a string. I want to know what kind of string is because, with this string i want to create it with the PHP function imagecreatefromstring(). Understand now?
 - 
	Hi there, I want to know what kind of string the dxGetTexturePixels function returns? I mean, what type is like base64 or something like that. Because, I want to recreate the image after with PHP. Someone?
 - 
	Okay, it works perfectly good. Thanks !
 - 
	Oh ok, say me if I'm on the right way. addEventHandler("onClientResourceStart", resourceRoot, function() myRenderTarget = dxCreateRenderTarget( 100, 80 ) end ) local rotation = 90; addEventHandler( "onClientRender", root, function() if myRenderTarget then dxSetRenderTarget( myRenderTarget ) dxDrawText ( "Hello", 10, 20 ) dxDrawImage( 50, 50, 100, 100, myRenderTarget , rotation, 0, 0) end end )
 - 
	Hi there, I want to know if exist a function or a trick to set a rotation to a dx text. That would be nice. Thanks
 - 
	Thanks !
 - 
	Well, I didn't notice that argument remove the colision. Solution please? x)
 - 
	Okay it works now. For peoples who have the same problem, just set true the last argument of the createObject. Thanks Castillo for your help and 6ArHxiMr'3a[Z]eF for your useless posts.
 - 
	What are you talking about??
 - 
	Yes it's client-side. Edit: And the last argument of the createObject? What it means?
 - 
	Hmm still not working -- creating world for i, object in ipairs(room.objects)do local obj = createObject(object.model, object.x, object.y, object.z, object.rx, object.ry, object.rz) engineSetModelLODDistance (object.model, 170) setElementDimension(obj, room.id) table.insert(Objects, obj) end
 - 
	Well, thanks for that function. It's very beautiful to see the GTA world like that but It doesn't work for my object. Check out the screenshot. As you can see, I've a object but he is like in alpha or smthg like that because i'm too far. I can see the GTA world very well but not the object. Idea?
 - 
	If i create an object in a place and I go very very far the object disappears.
 - 
	Hi there, I want to know if it's possible to set a object visible from far? A function for that maybe? Thanks.
 - 
	I think it's impossible because Plug.DJ use Youtube as music source... And I don't know if Plug.DJ have an API. To check. Maybe one day, MTA will have Youtube into it. Let's dream.
 - 
	Thanks alot for your help
 
