StefanAlmighty
Members-
Posts
143 -
Joined
-
Last visited
Everything posted by StefanAlmighty
-
Hmm, so I render it all even if it goes out of the gridlist and then set a render target? I've been reading the wiki about those two functions but not sure how they work exactly.
-
Okay so I'm making my own dx GUI system and I'm working on grid lists, an example: (So far I have windows, tab panels, edit fields, buttons and grid lists) So far you can: 'dxGridListAddColumn' , 'dxGridListAddRow' and 'dxGridListGetSelectedItemText', 'dxGridListSetColumnColour', 'dxGridListSetItemColour'. All work. Now I'm at the point where if there are too many rows to fit on the gridlist, I want it to make a scrollbar and scroll down. I need some tips as I'm not sure where to start (I know how to draw a scrollbar), but I don't know how to make it move when you drag it etc. I assume it's onClientClick. Also I have no idea how to make it render the different items as you scroll down.
-
Didn't destroy all the children of the children elements. I need a loop that loops through every possible child element and destroys them, but not sure how.
-
Solidsnake because of these notes: Thanks Karim, I'll try that now. PS: Karim will that work for children of children of children?
-
Okay so I'm working on a dxGUI system and the GUI's children is stored in tables in the element data. For example if you made an edit box on a window it would be stored in the getElementData(window, "children") which is a table. In my system children can have children can have children etc, I want a quick system which deletes the every element within the original window. I'm not sure how. I've started with this: function dxDestroyElement(element) -- destroys an entire tree of elements local children = getElementData(element, "children") if getElementData(element, "children") then for i, v in ipairs(children) do destroyElement(v) end end destroyElement(element) end This only destroys the main element and it's children. The 'grand-children' etc aren't destroyed as it'd be a huge chunk of code. Is there a way of constantly looping through the children destroying each one?
-
Is it possible to download this? Couldn't see a download button anywhere. https://wiki.multitheftauto.com/wiki/Resource:DxLibrary
-
No idea how that'd help making a tab panel with multiple tabs like MTA GUI. The same with edit boxes and memos. I was hoping there would be a resource similar to dxGUI but includes all variants of the MTA GUI?
-
I'm trying to use https://wiki.multitheftauto.com/wiki/Resource:DxGUI but it doesn't seem to have tab panels, edit boxes, memo's on it. Does anybody know where I can get a resource similar which includes ALL gui functions including tabs, gridlists etc?
-
1. Are you having both markers visible at the same time? If so, you need two different variables for each rather than just 'marker'. 2. Does debugscript display any errors?
-
To save things you can use MySQL which saves values into a database. When your player logs out you can save his stats, when he logs in you can load his stats by using SQL.
-
Tried that in the map editor but didn't work. Is it just the DFF or is it TXD also?
-
It's really that simple? I'll try but I'm guessing the object will be in a .IMG file?
-
Wang's showroom doesn't seem to have a completed back wall: However the same object HAS got a completed back wall in SAMP. Is there any way to convert or something?
-
Hi, is there a way to convert the UNIX from getResourceLastStartTime to seconds? So for example it would output how many seconds ago the resource was last started rather than the UNIX.
-
Hey, is it possible to disable GTA's auto-reload? I want to make it so instead of auto-reloading, the player must press R to reload their weapon.
-
After browsing the wiki it didn't tell me exactly what the following weapon properties do/effect: Weapon Range Target Range ^ I assume the weapon range is how far it can shoot, but what is target range? Another thing relating to this: https://wiki.multitheftauto.com/wiki/SetWeaponProperty The weapon skill levels, are they just the following skill levels: poor = Poor std = Gangster pro = Hitman
-
I'm confused on how to split strings, so I'm asking for help. If I have two values within one string like so: "10:20" I'd like to know how to split both numbers from the string into two separate numbers. From that string it would return integers 10 and 20. But how?
-
Nevermind! Turns out the encryption code was meant to be saved as an integer in the database, but the script was attempting to save it as a string. I fixed it by changing the datatype of the column to char(10) instead of int(10). Thanks for your help and from now on I will use database functions.
-
Got it working. However, it's causing the same issue but I know why. The encryption code I use for passwords is a 10 digit number. In the database the datatype for the column is: int(10). When I slowly broke down the query, it turned out to be the encryption code causing the issue - any suggestions?
-
Yes, it works with the MYSQL modules.
-
local Q3 = dbExec(mysql:connectMTA(), preparedQuery3) if Q3 then mysql:free_result(Q3) triggerClientEvent(source, "setLoginNotice", getRootElement(), "Successfully created account " .. username .. "!", 0, 255, 0) outputDebugString("DEBUG: " .. preparedQuery3) return true else mysql:free_result(Q3) triggerClientEvent(source, "setLoginNotice", getRootElement(), "Error creating account.", 255, 0, 0) return false end Doesn't work & dbExec returns false.
-
How come mysql_query works if it's clicked 4+ times, and it worked on a different script I used which is where I got the base idea from.
-
Okay so I've reached an issue where in my script I have the following line: local preparedQuery3 = "INSERT INTO `accounts` (username, password, email, security_question, security_answer, last_serial, last_ip, salt) VALUES ('" .. toSQL(username) .. "', '" .. toSQL(encryptedPW) .. "', '" .. toSQL(email) .. "', 'nil', 'nil', '" .. mtaSerial .. "', '" .. toSQL(ipAddress) .. "', '" .. toSQL(encryptionRule) .. "')" When I click the 'register' button on my server, it gathers all the information and should create an account. However, I have to click the 'register' button like 4+ times in order for it to create an account, even though the query runs perfectly and says the account has been created.
-
Okay so I've done that now, but now I want the password text to be hashed like you can do with GUI. Simply the "Password" text should appear as hashed (ps. "Password" is created via dxDrawText)
