Help... how to save the private vehicle with MYSQL data?
1 | ------ 0 0 0 0 0 NFS
Код:
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 );
}