12.03.2011, 08:58
I think max dimensions you can have is 3... You can't store for ex. weapon ammo in the ammo array.
You could do something like this:
In other words, you have 13 x 2 variables, of which first part will store weapons and the second part will store ammo. But with arrays you can store data at once and access them dynamically.
Now we've stored all the weapon data in an array containing 13 slots.
You could do something like this:
pawn Код:
new weapons[13][2];
pawn Код:
for (new i = 0; i < 13; i++)
{
GetPlayerWeaponData(playerid, i, weapons[i][0], weapons[i][1]);
}
//- SA-MP Wiki