SA-MP Forums Archive
Private Vehicle MYSQl Database! - 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: Private Vehicle MYSQl Database! (/showthread.php?tid=615164)



Private Vehicle MYSQl Database! - DandyCorleone - 18.08.2016

Help... how to save the private vehicle with MYSQL data?

MY MYSQL DATA BASE :
VID | id | Owner | PID | Vehicle | VLocked | PVPrice | Wheel | Plate |
1 | ------ 0 0 0 0 0 NFS

MY CODE :

Код:
if(PlayerInfo[playerid][Car] <= 0)
	{
		format( gsString, 2048, "UPDATE `personalvehicles` SET  `PVPrice` = '%d',`PID` = '%d',`Vehicle` = '' WHERE `id` = '%d'",PlayerInfo[ playerid ][ PVPrice ],PlayerInfo[ playerid ][ Car ], PlayerInfo[ playerid ][ AccID ] );
		mysql_query( gsString, THREAD_NONE, playerid );
 	}
 	else
 	{
		format( gsString, 2048, "UPDATE `personalvehicles` SET  `PVPrice` = '%d',`PID` = '%d',`Vehicle` = '%s' WHERE `id` = '%d'",PlayerInfo[ playerid ][ PVPrice ],PlayerInfo[ playerid ][ Car ],VehicleNames [PlayerInfo[ playerid ][ Car ] - 400], PlayerInfo[ playerid ][ AccID ] );
		mysql_query( gsString, THREAD_NONE, playerid );
	}
	return ( 1 );
}



Re: Private Vehicle MYSQl Database! - DandyCorleone - 18.08.2016

Help...! pls what the script for save the private vehicle