pawn Код:
enum vehfaccData{
v_faccid,
v_model,
Float:v_health,
v_col[2],
Float:v_pos[4],
v_id
}
new vehfacc[][vehfaccData] = {
{1, 427, 10000.0, {0, 1}, {0.0, 0.0, 0.0, 0.0}},
{1, 427, 10000.0, {0, 1}, {0.0, 0.0, 0.0, 0.0}},
{1, 427, 10000.0, {0, 1}, {0.0, 0.0, 0.0, 0.0}},
{1, 427, 10000.0, {0, 1}, {0.0, 0.0, 0.0, 0.0}},
{1, 427, 10000.0, {0, 1}, {0.0, 0.0, 0.0, 0.0}},
{1, 427, 10000.0, {0, 1}, {0.0, 0.0, 0.0, 0.0}}
};
public OnGameModeInit()
{
for(new i = 0; i < sizeof(vehfacc); i++)
{
vehfacc[i][v_id] = AddStaticVehicle(vehfacc[i][v_model], vehfacc[i][v_pos][0], vehfacc[i][v_pos][1], vehfacc[i][v_pos][2], vehfacc[i][v_pos][3], vehfacc[i][v_col][0], vehfacc[i][v_col][1]);
SetVehicleHealth(vehfacc[i][v_id], vehfacc[i][v_health]);
}
return true;
}
public OnVehicleSpawn(vehicleid)
{
for(new i = 0; i < sizeof(vehfacc); i++)
{
if(vehfacc[i][v_id] == vehicleid)
{
SetVehicleHealth(vehfacc[i][v_id], vehfacc[i][v_health]);
break;
}
}
return true;
}