26.09.2009, 22:30
Код:
GetPlayerWeaponData
Read the weapon and ammo in a specific weapon slot of a player.
Parameters:
(playerid, slot, &weapons, &ammo)
playerid ID of the player
slot Weapon slot to read (0-12)
&weapons Variable to store the weapon ID, passed by reference
&ammo Variable to store the ammo, passed by reference
This function does not return a specific value, it's best to simply ignore it.
//common use: get all weapons and store info in an array containing 13 slots
//first value is weapon id and second is ammo
new weapons[13][2];
for (new i = 0; i < 13; i++)
{
GetPlayerWeaponData(playerid, i, weapons[i][0], weapons[i][1]);
}

