use getplayerweapondata as condition.
#5

Why a two-dimensional array when a one-dimensional array would be enough? As far as I see, you do not have to temporarily store the results you get in the for-loop. Aswell, you should make sure to check all slots (0 - 12):

pawn Код:
new weaponData[2];
for(new s = 0; s <= 12; s++) {
    GetPlayerWeaponData(playerid, s, weaponData[0], weaponData[1]);
    if(weaponData[0] == 38 && weaponData[1] > 100) {
        // Player has Minigun with an amount of ammo greater than 100.
    }
}
Reply


Messages In This Thread
use getplayerweapondata as condition. - by Champ - 21.06.2014, 17:39
Re: use getplayerweapondata as condition. - by PrivatioBoni - 21.06.2014, 17:49
Re: use getplayerweapondata as condition. - by Shaneisace - 21.06.2014, 17:52
Re: use getplayerweapondata as condition. - by Champ - 21.06.2014, 19:14
Re: use getplayerweapondata as condition. - by Campbell- - 21.06.2014, 20:58

Forum Jump:


Users browsing this thread: 1 Guest(s)