Spawning Private Vehicles[MySQL]
#32

Try this code.
PHP Code:
stock LoadPlayerVehicles(playerid

    new
        
query[600],
        
0
    
format(querysizeof(query), "SELECT * FROM `playervehicles` WHERE `Name` = '%s' LIMIT %d"PlayerName(playerid), MAX_PLAYER_OWNED_CARS); 
    
mysql_query(query); 
    
mysql_store_result(); 
    
    
printf("%s"query); 
    
    while(
mysql_retrieve_row()) 
    { 
        
mysql_fetch_row_format(query);
        
printf("%s"query);
        
sscanf(query"p<|>s[24]dffffdddddddddddddddddddddddddddddddddddd"
            
PlayerOwnedVehicles[playerid][i][playerCarOwner], 
            
PlayerOwnedVehicles[playerid][i][playerCarModel], 
            
PlayerOwnedVehicles[playerid][i][playerCarX], 
            
PlayerOwnedVehicles[playerid][i][playerCarY], 
            
PlayerOwnedVehicles[playerid][i][playerCarZ], 
            
PlayerOwnedVehicles[playerid][i][playerCarRot], 
            
PlayerOwnedVehicles[playerid][i][playerCarColor1], 
            
PlayerOwnedVehicles[playerid][i][playerCarColor2], 
            
PlayerOwnedVehicles[playerid][i][playerCarPaintjob], 
            
PlayerOwnedVehicles[playerid][i][playerCarMod1], 
            
PlayerOwnedVehicles[playerid][i][playerCarMod2], 
            
PlayerOwnedVehicles[playerid][i][playerCarMod3], 
            
PlayerOwnedVehicles[playerid][i][playerCarMod4], 
            
PlayerOwnedVehicles[playerid][i][playerCarMod5], 
            
PlayerOwnedVehicles[playerid][i][playerCarMod6], 
            
PlayerOwnedVehicles[playerid][i][playerCarMod7], 
            
PlayerOwnedVehicles[playerid][i][playerCarMod8], 
            
PlayerOwnedVehicles[playerid][i][playerCarMod9], 
            
PlayerOwnedVehicles[playerid][i][playerCarMod10], 
            
PlayerOwnedVehicles[playerid][i][playerCarMod11], 
            
PlayerOwnedVehicles[playerid][i][playerCarMod12], 
            
PlayerOwnedVehicles[playerid][i][playerCarMod13], 
            
PlayerOwnedVehicles[playerid][i][playerCarMod14], 
            
PlayerOwnedVehicles[playerid][i][playerCarMod15], 
            
PlayerOwnedVehicles[playerid][i][playerCarMod16], 
            
PlayerOwnedVehicles[playerid][i][playerCarMod17], 
            
PlayerOwnedVehicles[playerid][i][playerCarHasLock], 
            
PlayerOwnedVehicles[playerid][i][playerCarLocked], 
            
PlayerOwnedVehicles[playerid][i][playerCarTrunkCash], 
            
PlayerOwnedVehicles[playerid][i][playerCarTrunkGun1], 
            
PlayerOwnedVehicles[playerid][i][playerCarTrunkGun2], 
            
PlayerOwnedVehicles[playerid][i][playerCarTrunkGun3], 
            
PlayerOwnedVehicles[playerid][i][playerCarTrunkGun4], 
            
PlayerOwnedVehicles[playerid][i][playerCarTrunkAmmo1], 
            
PlayerOwnedVehicles[playerid][i][playerCarTrunkAmmo2], 
            
PlayerOwnedVehicles[playerid][i][playerCarTrunkAmmo3], 
            
PlayerOwnedVehicles[playerid][i][playerCarTrunkAmmo4], 
            
PlayerOwnedVehicles[playerid][i][playerCarSpawned], 
            
PlayerOwnedVehicles[playerid][i][playerCarOwned], 
            
PlayerOwnedVehicles[playerid][i][playerCarOwnerID], 
            
PlayerOwnedVehicles[playerid][i][playerCarFuel], 
            
PlayerOwnedVehicles[playerid][i][playerCarSlotID
        );
        
        
printf("%s"query);
        
        
PlayerOwnedVehicles[playerid][i][playerCarID] = CreateVehicle(PlayerOwnedVehicles[playerid][i][playerCarModel], PlayerOwnedVehicles[playerid][i][playerCarX], PlayerOwnedVehicles[playerid][i][playerCarY], PlayerOwnedVehicles[playerid][i][playerCarZ], PlayerOwnedVehicles[playerid][i][playerCarRot], PlayerOwnedVehicles[playerid][i][playerCarColor1], PlayerOwnedVehicles[playerid][i][playerCarColor2], -1); 
        
AddVehicleMods(playeridi);
        
i++;
    } 
    
mysql_free_result();
    return 
1

Reply


Messages In This Thread
Spawning Private Vehicles[MySQL] - Vehicle Not Spawning. - by Peach - 21.12.2012, 16:21
Re: Spawning Private Vehicles[MySQL] - by Peach - 22.12.2012, 16:45
Re: Spawning Private Vehicles[MySQL] - by Faisal_khan - 22.12.2012, 16:51
Re: Spawning Private Vehicles[MySQL] - by Peach - 22.12.2012, 16:52
Re: Spawning Private Vehicles[MySQL] - by ReneG - 22.12.2012, 17:08
Re: Spawning Private Vehicles[MySQL] - by Peach - 22.12.2012, 17:50
Re: Spawning Private Vehicles[MySQL] - by ReneG - 22.12.2012, 17:57
Re: Spawning Private Vehicles[MySQL] - by Peach - 22.12.2012, 18:05
Re: Spawning Private Vehicles[MySQL] - by Peach - 23.12.2012, 17:58
Re: Spawning Private Vehicles[MySQL] - by ReneG - 24.12.2012, 01:23
Re: Spawning Private Vehicles[MySQL] - by Peach - 24.12.2012, 08:56
Re: Spawning Private Vehicles[MySQL] - by ReneG - 24.12.2012, 20:28
Re: Spawning Private Vehicles[MySQL] - by Peach - 24.12.2012, 20:42
Re: Spawning Private Vehicles[MySQL] - by BlackBank - 24.12.2012, 23:56
Re: Spawning Private Vehicles[MySQL] - by Peach - 25.12.2012, 08:30
Re: Spawning Private Vehicles[MySQL] - by BlackBank - 25.12.2012, 10:17
Re: Spawning Private Vehicles[MySQL] - by Peach - 25.12.2012, 11:18
Re: Spawning Private Vehicles[MySQL] - by BlackBank - 25.12.2012, 12:00
Re: Spawning Private Vehicles[MySQL] - by Peach - 25.12.2012, 13:29
Re: Spawning Private Vehicles[MySQL] - by BlackBank - 25.12.2012, 13:46
Re: Spawning Private Vehicles[MySQL] - by Peach - 25.12.2012, 14:59
Re: Spawning Private Vehicles[MySQL] - by ReneG - 25.12.2012, 16:30
Re: Spawning Private Vehicles[MySQL] - by Peach - 25.12.2012, 16:32
Re: Spawning Private Vehicles[MySQL] - by ReneG - 25.12.2012, 16:41
Re: Spawning Private Vehicles[MySQL] - by Peach - 25.12.2012, 16:43
Re: Spawning Private Vehicles[MySQL] - by ReneG - 25.12.2012, 16:57
Re: Spawning Private Vehicles[MySQL] - by Peach - 25.12.2012, 17:06
Re: Spawning Private Vehicles[MySQL] - by BlackBank - 25.12.2012, 18:26
Re: Spawning Private Vehicles[MySQL] - by Peach - 25.12.2012, 19:36
Re: Spawning Private Vehicles[MySQL] - by BlackBank - 25.12.2012, 20:51
Re: Spawning Private Vehicles[MySQL] - by Peach - 27.12.2012, 18:33
Re: Spawning Private Vehicles[MySQL] - by BlackBank - 27.12.2012, 19:43
Re: Spawning Private Vehicles[MySQL] - by Peach - 27.12.2012, 20:42
Re: Spawning Private Vehicles[MySQL] - by BlackBank - 27.12.2012, 21:19
Re: Spawning Private Vehicles[MySQL] - by Peach - 28.12.2012, 09:51
Re: Spawning Private Vehicles[MySQL] - by Peach - 30.12.2012, 14:43
Re: Spawning Private Vehicles[MySQL] - by BlackBank - 31.12.2012, 14:48
Re: Spawning Private Vehicles[MySQL] - by Peach - 01.01.2013, 16:07

Forum Jump:


Users browsing this thread: 2 Guest(s)