09.02.2016, 01:07
I'm keeping the vehicle components this way:
and load it
It keep and load correctly but apparently some are not added to the vehicle visually, e.g. tunings to the bonnet and trims (I see that the trims modifications are loading places as if they were tires lol). It's bug SA-MP? because even I made a cmd to verify the current components of the vehicle and are exactly the same in the order of the table, and it are listed as the vehicle has it but not visually. (Also I checked the values of the variables and well)
should I make an additional condition?
sorry for my bad english?
Код:
for(new i = 0; i <= 13; i++) { var[playerid][component][i] = GetVehicleComponentInSlot(vehicleid, i); } new components[70]; format(components,70,"%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d", var[playerid][component][0], var[playerid][component][1], var[playerid][component][2], var[playerid][component][3], var[playerid][component][4], var[playerid][component][5], var[playerid][component][6], var[playerid][component][7], var[playerid][component][8], var[playerid][component][9], var[playerid][component][10], var[playerid][component][11], var[playerid][component][12], var[playerid][component][13]); //I do update the DB
Код:
//load the string of DB to "components" //and set in your respective variables sscanf(components,"p<|>iiiiiiiiiiiiii", var[playerid][component][0], var[playerid][component][1], var[playerid][component][2], var[playerid][component][3], var[playerid][component][4], var[playerid][component][5], var[playerid][component][6], var[playerid][component][7], var[playerid][component][8], var[playerid][component][9], var[playerid][component][10], var[playerid][component][11], var[playerid][component][12], var[playerid][component][13]); //and add it to vehicle for(new i = 0; i <= 13; i++) { AddVehicleComponent(vehicleid, var[playerid][component][i]); }
should I make an additional condition?
sorry for my bad english?