14.05.2014, 09:45
https://sampwiki.blast.hk/wiki/GetPlayerWeaponData
Try to read some documentation. I suggest you to do it in double-dimensional array..
Tutorial for single/double-dimensional arrays
Use it like this - Weapons[1][i] This will load all the weapons and Weapons[2][i] this will load all the ammo, put it in a for loop and read the documentation. Instead of grabbing a pre-made script, make your own? You'll learn much faster that way.
When a player spawns, you need to reset their ammo value and then add it again, so save it into the variable, remove it and give it back again, since it duplicates.
Try to read some documentation. I suggest you to do it in double-dimensional array..
Tutorial for single/double-dimensional arrays
pawn Код:
enum WepData
{
Weapons[2][13]
}
pawn Код:
enum WepData
{
Weapon1,
Weapon1a,
Weapon2,
Weapon2a,
Weapon3,
Weapon3a,
Weapon4,
Weapon4a,
Weapon5,
Weapon5a,
Weapon6,
Weapon6a,
Weapon7,
Weapon7a,
Weapon8,
Weapon8a,
Weapon9,
Weapon9a,
Weapon10,
Weapon10a,
Weapon11,
Weapon11a,
Weapon12,
Weapon12a, <-- AND IF YOU CHECK THIS ONE.. IT DOESN'T STOP! IT SHOULDN'T BE ANY COMMA HERE
}