01.08.2018, 17:09
PHP код:
new Float:x, Float:y, Float:z, Float:a;
new carid = Car_Nearest(playerid);
new id = Car_GetID(vehicleid);
new Float:vHealth;
new veh;
veh = GetPlayerVehicleID(playerid);
GetVehicleHealth(veh, vHealth);
GetVehiclePos(vehicleid,x,y,z);
GetVehicleZAngle(vehicleid,a);
CarData[carid][carPos][0] = x;
CarData[carid][carPos][1] = y;
CarData[carid][carPos][2] = z;
CarData[carid][carPos][3] = a;
CarData[carid][carHealth] = vHealth; //ERROR TAG MISMATCH !!!!!!!
Car_Save(id);
SQL_SaveCharacter(playerid);
return 1;
}
PHP код:
CarData[i][carExists] = true;
CarData[i][carID] = cache_get_field_int(i, "carID");
CarData[i][carModel] = cache_get_field_int(i, "carModel");
CarData[i][carOwner] = cache_get_field_int(i, "carOwner");
CarData[i][carPos][0] = cache_get_field_float(i, "carPosX");
CarData[i][carPos][1] = cache_get_field_float(i, "carPosY");
CarData[i][carPos][2] = cache_get_field_float(i, "carPosZ");
CarData[i][carPos][3] = cache_get_field_float(i, "carPosR");
CarData[i][carColor1] = cache_get_field_int(i, "carColor1");
CarData[i][carColor2] = cache_get_field_int(i, "carColor2");
CarData[i][carPaintjob] = cache_get_field_int(i, "carPaintjob");
CarData[i][carLocked] = cache_get_field_int(i, "carLocked");
CarData[i][carImpounded] = cache_get_field_int(i, "carImpounded");
CarData[i][carImpoundPrice] = cache_get_field_int(i, "carImpoundPrice");
CarData[i][carFaction] = cache_get_field_int(i, "carFaction");
CarData[i][carFuel] = cache_get_field_int(i, "carFuel");
CarData[i][carHealth] = cache_get_field_float(i, "carHealth"); // AND OTHER HERE