18.06.2015, 14:11
Hey guys,
Am having problems, it seems that once my cars spawn, they don't save the faction ID's, so like when it spawns, sets it to the factions ID so that it restricts people from entering the car but it doesn't seem to save the ID through the vInfo or database, heres one of the codes for it:
Am having problems, it seems that once my cars spawn, they don't save the faction ID's, so like when it spawns, sets it to the factions ID so that it restricts people from entering the car but it doesn't seem to save the ID through the vInfo or database, heres one of the codes for it:
pawn Код:
stock CreateSASDVehicle(playerid, model)
{
new Query[300], v;
v = CreateVehicle(model, 171.8950, -14.6031, 1.5781, 268.1325, 55, 1, 10000000000000, 1);
vInfo[v][ModelID] = model;
vInfo[v][posX] = 171.8950;
vInfo[v][posY] = -14.6031;
vInfo[v][posZ] = 1.5781;
vInfo[v][posA] = 268.1325;
vInfo[v][ColorA] = 55;
vInfo[v][ColorB] = 0;
vInfo[v][Faction] = 2;
vInfo[v][Faction] = 2;
format(vInfo[v][NrPlate], vInfo[v][NrPlate], "BB-0000");
format(Query, sizeof(Query), "INSERT INTO `vehicledata` (`ModelID`, `posX`, `posY`, `posZ`, `posA`, `ColorA`, `ColorB`, `Faction`, `Plate`) VALUES (%d, %f, %f, %f, %f, %d, %d, %d, '%s')",
vInfo[v][ModelID],
vInfo[v][posX],
vInfo[v][posY],
vInfo[v][posZ],
vInfo[v][posA],
vInfo[v][ColorA],
vInfo[v][ColorB],
vInfo[v][Faction],
vInfo[v][NrPlate]);
mysql_query(Query);
return 1;
}