Quote:
Originally Posted by wups
Ok a little mod, since pistols are always slot 2.
pawn Код:
new weap[2]; GetPlayerWeaponData(playerid,2,weap[0],weap[1]); // weap[0] is the weapon, and weap[1] is ammo. if(weap[0] == 22 || weap[0] == 23 || weap[0] == 24) { GivePlayerMoney(playerid, -200); SetPlayerAmmo(playerid, GetPlayerWeapon(playerid), weap[1]+20); } else { SendClientMessage(playerid, COLOR_LRED, "You don't have the right weapon for this kind of ammo."); }
|
Use this. U get the weapon but which weapon?
pawn Код:
SetPlayerAmmo(playerid, GivePlayerWeapon(playerid,weap[0], 20), weap[1]+20);