26.11.2010, 11:35
Код:
stock SavePlayerVehicle(vehid) { format(string, sizeof(string), "UPDATE `vehicles` SET `vPos` = '%f', `vPos2` = '%f', `vPos3` = '%f', `vPos4` = '%f', `Price` = '%i'", VehicleInfo[vehid][vPos][0], VehicleInfo[vehid][vPos][1], VehicleInfo[vehid][vPos][2], VehicleInfo[vehid][vPos][3], VehicleInfo[vehid][vprice], VehicleInfo[vehid][vrent], VehicleInfo[vehid][vbuyable], VehicleInfo[vehid][vfaction]{VehicleInfo[vehid][vPos][0], VehicleInfo[vehid][vPos][1], VehicleInfo[vehid][vPos][2], VehicleInfo[vehid][vPos][3], VehicleInfo[vehid][vprice]); format(string, sizeof(string), "%s, `Gang` = '%i', `job` = '%i', `Fuel` = '%i', `Model` = '%i', `Owner` = '%i', `Lock` = '%i', `Mod1` = '%i', `Rent` = '%i', `Buyable` = '%i', `Faction` = '%i'", string, VehicleInfo[vehid][vgang], VehicleInfo[vehid][vjob], VehicleInfo[vehid][Fuel], VehicleInfo[vehid][vModel], VehicleInfo[vehid][vOwner], VehicleInfo[vehid][vLock], VehicleInfo[vehid][vMod][0],VehicleInfo[vehid][vrent], VehicleInfo[vehid][vbuyable], VehicleInfo[vehid][vfaction]); format(string, sizeof(string), "%s, `Mod2` = '%i',`Mod3` = '%i',`Mod4` = '%i',`Mod5` = '%i',`Mod6` = '%i',`Mod7` = '%i',`Mod8` = '%i',`Mod9` = '%i',`Mod10` = '%i' WHERE `SQLID` = '%d'", string, VehicleInfo[vehid][vMod][1],VehicleInfo[vehid][vMod][2],VehicleInfo[vehid][vMod][3],VehicleInfo[vehid][vMod][4],VehicleInfo[vehid][vMod][5],VehicleInfo[vehid][vMod][6],VehicleInfo[vehid][vMod][7],VehicleInfo[vehid][vMod][8], VehicleInfo[vehid][vMod][9] ); format(string, sizeof(string), "%s, `Mod11` = '%i' ,`Mod12` = '%i' ,`Mod13` = '%i' ,`Mod14` = '%i' ,`Mod15` = '%i' ,`Mod16` = '%i',`Mod17` = '%i' WHERE `SQLID` = '%d'",string,VehicleInfo[vehid][vMod][10],VehicleInfo[vehid][vMod][11],VehicleInfo[vehid][vMod][12],VehicleInfo[vehid][vMod][13],VehicleInfo[vehid][vMod][14],VehicleInfo[vehid][vMod][15],VehicleInfo[vehid][vMod][16], VehicleInfo[vehid][vSQLID] ); mysql_query(string); }