Quote:
Originally Posted by CoaPsyFactor
hi there, i have one more question for array
pawn Код:
enum BuyAbleVehicleInfo{ Model, Name[32], Price
} //Buyable vehicles new buyablevehicles[][BuyAbleVehicleInfo] = { {400, "Landstalker", 15000}, {401, "Bravura", 10000}, {402, "Buffalo", 70000}, {404, "Perenniel", 8000} }
now how to do if someone want to buy vehicle with Model ID 402, how to get Price form Array that Model ID is 402?
|
the simple way to get this is using iteration.
but if you concerned about CPU usage, you need to use more memory.