07.08.2012, 14:38
I have a question, is it possible to make one thing. For example, there is array:
411, 560, 562 - vehicle model.
Then, for example, I need to attach sirens object to vehicle model 560, but I need to get coordinates from array. How to do that, without having checking IDs like that
pawn Код:
new Sirens[MAX_SIRENS][someenum] =
{
{411, object x, object y, object z, object rx, object ry, object rz},
{560, object x, object y, object z, object rx, object ry, object rz},
{562, object x, object y, object z, object rx, object ry, object rz}
+-20 other vehicles
};
Then, for example, I need to attach sirens object to vehicle model 560, but I need to get coordinates from array. How to do that, without having checking IDs like that
pawn Код:
if (GetVehicleModel(some vehicleid) == 411)
{
}
if (GetVehicleModel(some vehicleid) == 560)
{
}
if (GetVehicleModel(some vehicleid) == 562)
{
}