SA-MP Forums Archive
I can’t get second info for one person - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: I can’t get second info for one person (/showthread.php?tid=523299)



I can’t get second info for one person - Ahriman - 01.07.2014

Hello, I am coding a MYSQL based system that will save the vehicles. I'm having the information of vehicle owners by nicknames.But the problem is when same person is saving two or more vehicles ican only have the information of first vehicle , nothing more. I want to do when I press the shift key deleting the old vehicle information and recording details of the new vehicle. How can i do this? Thanks for your help.


Re: I can’t get second info for one person - Ahriman - 02.07.2014

??


Re: I can’t get second info for one person - MacT - 02.07.2014

You can make this for using mysql function UPDATE to update vehicle owner data and than using 3dtextlabel to show who is vehicle info. And if you want player have two vehicles, when you need write to player enum vehicle1 and vehicle2.


Re: I can’t get second info for one person - Ahriman - 03.07.2014

Quote:
Originally Posted by MacT
Посмотреть сообщение
You can make this for using mysql function UPDATE to update vehicle owner data and than using 3dtextlabel to show who is vehicle info. And if you want player have two vehicles, when you need write to player enum vehicle1 and vehicle2.
But i don't save only vehicle ids, i save all the info of vehicles. That's why i need to use too long enum for one player.
Does anybody have any ideas ?


Re: I can’t get second info for one person - dominik523 - 03.07.2014

It's not a problem to save large enum in some table. I had 5 vehicles with all data saved for each player in SQLite. You don't need to save vehicle IDs, you only need to save everything else including model ID. Player's vehicles will get new ID each time they connect to the server.