MySQL Variable/Enum is using cached data instead of updating
#7

Quote:
Originally Posted by Grim_
Посмотреть сообщение
Okay. Just to clarify you are updating CarData[carid][carID] when the player loads a different vehicle from the database? Because your query for updating the data is dependent on that row. If it doesn't update between vehicles it will edit only the first one.
I'm 99% sure I am, at least that's what I meant for my code to do. Each vehicle has it's own separate "carID" in the database. I make it set the variable: currentCarID[playerid], to the value the player enters on the /vget command. So let's say they do: /vget 375, this will spawn the vehicle with "carID" 375 in the database and set the value of: currentCarID[playerid], to 375. Then, when the player does /park while inside the vehicle, it checks every vehicle in the database and if the vehicle's [carID] matches with the value of: currentCarID[playerid], then it will save/update that car's data and then destroy the vehicle.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)