Stranger Posted June 1, 2014 Share Posted June 1, 2014 hey, i was wondering how to make the grid list save more than 1 car, i have make a cars shop, and it's work just fine, but there is a little problem , the problem is in the 'save' i make it if someone login, the cars that he bought before all show into the list it's work but only shows one car but i bought 3 cars, but only one shows. Server side: addEventHandler ("onPlayerLogin", root, function (thePreviousAccount, theCurrentAccount, autoLogin) if not isGuestAccount (getPlayerAccount (source)) then car = getAccountData (theCurrentAccount, "MyCar") if car then carName = getVehicleNameFromModel (car) triggerClientEvent (source, "getItBack", source, carName) end end end) Client side: addEvent ("getItBack", true) addEventHandler ("getItBack", root, function (veh) row = guiGridListAddRow (grid) guiGridListSetItemText (grid, row, 1, veh, false, false) end) So, Help. Link to comment
xXMADEXx Posted June 1, 2014 Share Posted June 1, 2014 It would require changing most of the script. Rather than just having one accountData with all of the vehicle data, it should be a table containing all of the players vehicles and their data. Link to comment
Stranger Posted June 1, 2014 Author Share Posted June 1, 2014 do you mean like table.insert Link to comment
Stranger Posted June 1, 2014 Author Share Posted June 1, 2014 oh, will it's hard for me, but is there any other way to do it by "accountData" ? Link to comment
TAPL Posted June 1, 2014 Share Posted June 1, 2014 It's not hard, it's just that you need to give it a try and understand how it works. Also tutorial is available across the forum and the internet for SQL syntax. Link to comment
Stranger Posted June 1, 2014 Author Share Posted June 1, 2014 I'll take your advice, and i will try. thanks any way, "TAPL", "xXMADEXx". Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now