Array.
#1

I have a question, is it possible to make one thing. For example, there is array:

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
};
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 Код:
if (GetVehicleModel(some vehicleid) == 411)
{
}

if (GetVehicleModel(some vehicleid) == 560)
{
}

if (GetVehicleModel(some vehicleid) == 562)
{
}
Reply


Messages In This Thread
Array. - by BaubaS - 07.08.2012, 14:38
Re: Array. - by Vince - 07.08.2012, 14:51
Re: Array. - by BaubaS - 07.08.2012, 14:56
Re: Array. - by Vince - 07.08.2012, 15:44
Re: Array. - by BaubaS - 07.08.2012, 16:53

Forum Jump:


Users browsing this thread: 1 Guest(s)