
callum123
Members-
Posts
41 -
Joined
-
Last visited
Everything posted by callum123
-
Spawning system, click on a button and that has element data regarding the character (button) you have chosen. Anyways I fixed my error. I didn't realise you could not leave the path blank.
-
Alright thanks. Another quick question, I have been setting element data to a button and everything worked, I tried switching the button to a static image and now its not being classed as an element? Is is possible to setElementData to a guiCreateStaticImage like you can do to a guiCreateButton?
-
I don't think I can, however I thought I would just check... Is it possible to draw images inside a scroll pane? - Setting the parent of the dxDrawImage to the scrollpane? Since the dxDrawImages are not elements (correct me if I am wrong), I am not able to do this? Thanks, Callum
-
I'm unsure where I would have to set the data.. What I have been doing is just making a new column in an SQL table. I made a column called 'hunger' and then set the default value to 100 and then I am trying to get that value.
-
[Help/GUI] Store, read and use data from a gridlist
callum123 replied to Mittell Buurman's topic in Scripting
I think he wants it so the people who use the GUI can go on it and store their own data. And then store that clientside and not in like an sql table. -
So, if I want to select a vehicle from an SQL database and then pull it into the code, how can I then turn that into an element so then I can use getVehiclePlate etc... So far I have it where Io pull the certain vehicles from the SQL and then populate a gridlist clientside. Trouble is I need to get like the vehicles name and lots of other details of the vehicles. I think this sort of makes sense, thanks for your help.
-
Say I have some mapping, is there any difference in FPS, draw distance, Lag etc... from converting a map file into createObject in lua? Whats are the pro's and con's of each? Thanks.
-
Like this will not even display the debug string. logInDetails1 = "Hello123" for _, vehicle in ipairs (getElementsByType ("vehicle")) do if getVehiclePlateText ( vehicle ) == tostring(logInDetails1) then outputDebugString("Test") Is https://wiki.multitheftauto.com/wiki/GetVehiclePlateText a server function? In the list it is not displayed yet on the actual page it is displayed...?
-
No errors no, even if I do if getVehiclePlateText ( vehicle ) == "Hello123" then And I know there is a vehicle with that plate, it seems not to enter the if statement.
-
Tried doing this with no luck. Is there some minor tweaks needed? function getVehicleByPlate ( logInDetails ) for _, vehicle in ipairs (getElementsByType ("vehicle")) do if getVehiclePlateText ( vehicle ) == logInDetails then found = vehicle local x, y, z = getElementPosition(source) local vx, vy, vz = getElementPosition(found) if getDistanceBetweenPoints2D(x, y, vx, vy) < 420 then createBlipAttachedTo(found, 0, 4, 255, 0, 0, 255, 0, 100, source) outputChatBox("Plate registered and found, destination marked on GPS", 255, 0, 0, true) end break end return found end end
-
How do I get the vehicle from the number plate? Is it possible? I want to add a blip to the vehicle without anyone inside it. I want to get hold of the vehicle from the number plate....
-
What I wanted to do was to allow players to start/stop resources for themselves without it affecting any other players. Edit: Or how about just using these (Since I wanted to make the script for allowing car mods) engineLoadDFF engineLoadTXD and then making them load for the player who called it only? Therefore some players can have car mods and other can choose not to install them? Could that work?
-
So I am in a server and I want to then open a gui and click 'download this script' and then that script will download to your own client side files after you have pressed it. How would this be possible? For example if I wanted to make a resource only available to be downloaded by those I want it to?
-
Alright, thanks for your quick help! I did try something like that, but without the check! Thanks for helping me learn!
-
I'm using it client side, heres what I was doing function bindthemkeys() setTimer ( function() addCommandHandler("bb", applybb) end, 2000, 1 ) end addEventHandler( "onClientVehicleEnter", getRootElement() , bindthemkeys) function unbindthemkeys() removeCommandHandler("bb") end addEventHandler( "onClientVehicleExit", getRootElement() , unbindthemkeys)
-
is it possible to execute this command for the person who called it only?
-
Firstly, why is setObjectBreakable only clientside? its really annoying. So, I have these two objects that are breakable and want to use them for gates and the setObjectBreakable is a client side function only. I would like the gate to be servers side so that everyone will see the object move. Is it possible to setObjectBreakable yet, move that object serverside, and if so how? Thanks for your help, Callum.
-
I'm not sure why it was not working with the memo, I changed to to an edit box and it worked fine, so I guess I will just use an edit box, thanks for your help.
-
Hey, having a little trouble here. So i have a memo created and I want to get the text thats inside the memo and then do a test on it to see if its blank. I am trying to do... if guiGetText(descriptionMemo) == "" then random code here else random other code here end For some reason when the memo is blank or if it has value in it, it will skip that line and then do whats in the else. Any suggestions?
-
Ahh, I see thank you both for your help.
-
Tryed that, but still get the error. Let me show you it exactly. Since I am using pictures. Error: lua:2: '}' expected (to close '{' at line 1) near '=' local hello = { 'hi.png' = true, 'hey.png' = true, }
-
local hello = { hi = true, hey = true, } I'm trying to do something like this, but then get the error to close the curly braced bracket
-
Yeah, probably not going to do that then. The default should be changed to lighter black in my opinion, it looks so much better!
-
Alright, thanks for your help. I am not sure if any of them work, since I just scrapped the GUI window and used an image as my main screen thing, and then made the buttons children of the image.