-
Posts
161 -
Joined
-
Last visited
Everything posted by FWCentral
-
Still doesn't work function updateLocations ( location ) for i=0, guiGridListGetRowCount(locationsList)do if(guiGridListGetItemText(locationsList,i,1)==location)then guiGridListRemoveRow(locationsList,i) local row2 = guiGridListAddRow ( locationsList ) guiGridListSetItemText ( locationsList, row2, 1, location, false, false ) elseif(guiGridListGetItemText(locationsList,i,1)~=location)then local row2 = guiGridListAddRow ( locationsList ) guiGridListSetItemText ( locationsList, row2, 1, location, false, false ) end end end Now it shows it like this; cheese LS LS dwd dwd dwd But there is only one dwd in the DB and 2 LS and one Cheese, But i want it to only show one LS one Cheese and one dwd, For some reason it doesn't and i don't have a clue why its showing 3 dwd's
-
Guys i don‘t need to know about the animation i need to know how to check if there is already a row in the gridlist with the same text in column 1.
-
Thanks i don't need to know about the guiSetPosition anymore thanks though, Does anyone know how to stop adding something to a gridlist if a row with the same name already exists there?
-
Really no one knows?
-
Nah it returns the locations fine mate im trying to see if there is already a row in the gridlist with the same value
-
string: LS -- these are the locations i added string: Cheese string: LS But it doesn't show any in the list
-
Yeah it's a string
-
That still doesn't create any rows, It created them before i added the 3 lines under function but there was copies of the same location in the gridlist.
-
Ok that would work but when the gridlist first comes up its empty so i tried doing it like this; addEvent("UpdateLocation",true) function updateLocations(location) local amount = guiGridListGetRowCount ( locationsList ) or 1 for row = 1, amount do if guiGridListGetItemText ( locationsList, row, 1 ) == location then else local row = guiGridListAddRow(locationsList) guiGridListSetItemText ( locationsList, row, 1, location, false, false ) end end end addEventHandler("UpdateLocation", getLocalPlayer(),updateLocations) It doesn't give an error and doesn't show any rows And Kenix i meant how could i make a table out of all the rows in the gridlist
-
Thanks Solidsnake i know that but how do i get the rows into a table?
-
So how can i loop through each row?
-
Because im getting the data for the list from a DB and it creates the row even if its got the same names
-
I don't need help with the sliding anymore thanks CapY, I need to know how to check if a gridlist row already contains the same text how can i do that??
-
Thanks for that, Im using it differently for a spawn GUI though but thanks Another question, How can i check if a gridlist already has a row with the same name? Like say i make a command /addrow [ROWNAME] And then i type /addrow FWCentral then again i type /addrow FWCentral how can i check if there is already one to stop it?
-
Ahh ha thanks man
-
I want a GUI to slide in from the side how can i do it?
-
Ill check it for you i know what the problem is mate PM me your TV, For anyone else with this issue folders in the resource folder that are wrapped in [ ] it means it is another directory for you to sort your resources. An actual resource folder should not have [ at the start and not have ] at the end.
-
Thanks man that helped me a lot
-
Yeah i know it returns like that and that's what i don't understand, I retrieve the table from the DB, Then how can i use the data? Let's say i want to output all the data through the chat box how would i do it?
-
It means that the resource is in the MTA config file but not in the resource folder i think.
-
Thanks i managed to create the table and insert data into the table but i want to now retrieve the data from the db and I've used executeSQLQuery to get the table now how can i use that table and the things in it i don't understand
-
First that is to build MTASA from source code. To create a server download the latest MTA from mtasa.com and then when your installing it will ask you if you want to include the server files and the client, Then go into you MTA directory where you installed it and open server then there will be a MTA Server.exe that is where you run the server from, Then you can go into mods>deathmatch>resources and add free resources from the community at community.multitheftauto.com or you can learn LUA and script it yourself.
-
Thanks man, How will this return the results?
-
Ok im trying to create a spawn system using SQLite. Creating the table executeSQLCreateTable ( "Spawn", "name TEXT, gang TEXT, city TEXT, type TEXT, x REAL, y REAL, z REAL, wep1 INTEGER, wep2 INTEGER, wep3 INTEGER, wep4 INTEGER, wep5 INTEGER, wep6 INTEGER, skin1 INTEGER, skin2 INTEGER, skin3 INTEGER") Now is this how i would get all the results from each field of the table? GetSpawns = executeSQLSelect ( "Spawn", "*")
-
Does anyone know when this function will be enabled?
