30.03.2014, 19:14
alguem ajuda a arrumar so os carros das casas que tiverem dono pra spawnar as que nгo tem dono nгo spawnar?
pawn Code:
AddHouseCar(houseid, modelid, Float:Carx, Float:Cary, Float:Carz, Float:Angle , color1, color2, respawn_delay)
{
new house[256];
format(house, sizeof(house), "Casas/Casaid%d",houseid);
if(dini_Exists(house))
{
cInfo[houseid][GotCar] = 1;
if(dini_Int(house, "CarModel") == 0)
{
dini_IntSet(house, "CarModel", modelid);
cInfo[houseid][CarModel] = modelid;
cInfo[houseid][CarX] = Carx;
cInfo[houseid][CarY] = Cary;
cInfo[houseid][CarZ] = Carz;
cInfo[houseid][AnglE] = Angle;
dini_FloatSet(house, "CarX", Carx);
dini_FloatSet(house, "CarY", Cary);
dini_FloatSet(house, "CarZ", Carz);
dini_FloatSet(house, "Angle", Angle);
cInfo[houseid][CarColor1] = color1;
cInfo[houseid][CarColor2] = color2;
dini_IntSet(house, "CarColor1", color1);
dini_IntSet(house, "CarColor2", color2);
dini_IntSet(house, "Respawn_Delay", respawn_delay);
cInfo[houseid][Respawn_Delay] = respawn_delay;
cInfo[houseid][HouseCar] = CreateVehicle(cInfo[houseid][CarModel], Carx, Cary, Carz, Angle, color1, color2, respawn_delay);
}
else
{
cInfo[houseid][CarModel] = dini_Int(house, "CarModel");
}
cInfo[houseid][CarX] = dini_Int(house, "CarX");
cInfo[houseid][CarY] = dini_Int(house, "CarY");
cInfo[houseid][CarZ] = dini_Int(house, "CarZ");
cInfo[houseid][CarColor1] = dini_Int(house, "CarColor1");
cInfo[houseid][CarColor2] = dini_Int(house, "CarColor2");
cInfo[houseid][HouseCar] = CreateVehicle(cInfo[houseid][CarModel], Carx, Cary, Carz, Angle, cInfo[houseid][CarColor1], cInfo[houseid][CarColor2], respawn_delay);
cInfo[houseid][AnglE] = dini_Int(house, "Angle");
}
}