27.02.2016, 12:24
Ok, so I noticed 1 thing. I haven't post full code at first because I though it was unnecessary
And I get printed
Health 1000.00
Veh health : 0.00
So it gets VehHealth fine but it becomes 0 after creating vehicle
Код:
new vehicleid;
PVeh[vehicleid][VehModel] = cache_get_field_content_int(0, "VehModel");
PVeh[vehicleid][VehDestroyed] = cache_get_field_content_int(0, "VehDestroyed");
PVeh[vehicleid][VehFuel] = cache_get_field_content_int(0, "VehFuel");
PVeh[vehicleid][VehHealth] = cache_get_field_content_float(0, "VehHealth");
PVeh[vehicleid][VehX] = cache_get_field_content_float(0, "VehX");
PVeh[vehicleid][VehY] = cache_get_field_content_float(0, "VehY");
PVeh[vehicleid][VehZ] = cache_get_field_content_float(0, "VehZ");
PVeh[vehicleid][VehA] = cache_get_field_content_float(0, "VehA");
printf("Health %.2f",PVeh[vehicleid][VehHealth]);
vehicleid = CreateVehicle(PVeh[playerid][VehModel],PVeh[playerid][VehX], PVeh[playerid][VehY], PVeh[playerid][VehZ],PVeh[playerid][VehA],-1,-1,-1);
printf("Veh health : %.2f", PVeh[vehicleid][VehHealth]);
Health 1000.00
Veh health : 0.00
So it gets VehHealth fine but it becomes 0 after creating vehicle

