Quote:
Originally Posted by CoaPsyFactor
hi all i have 1 question, if i have
pawn Код:
new buyablevehicles[][32] = { {400, "Landstalker", 15000} };
how to get 400, then "Landstalker", and then 15000?
|
1. use enumeration
enum Vehicleinfo ( size 34 - variable structure )
{
Model, //array 0
Name[32], //array 1-32
Price //array 33
}
new buyablevehicles[][Vehicleinfo] =
{
{400, "Landstalker", 15000},
{493, "bmx", 1500}
}
and you can refer it with buyablevehicles[Model], (or buyablevehicles[Vehicleinfo:0] )
buyablevehicles[Name], buyablevehicles[Price]
this is the best way to implement the requested feature ( as far as I know
) Thanks.