30.08.2011, 15:16
pawn Код:
if(itemid == ITEM_COLT45CLIP) {
new ammo;
GetPlayerWeaponData(playerid, 2, ammo, ammo);//ammo is set last
if(ammo > 1) return SendClientMessage(playerid, -1, "You already have colt45 ammo?");
RemoveItemFromPlayerInventory(playerid, ITEM_COLT45CLIP, 1);
GivePlayerWeapon(playerid,22, 17);
ApplyAnimationEx(playerid, "SILENCED", "Silence_reload", 3.0, 0, 0, 0, 0, 0);
SendClientMessage(playerid, COLOR_GREEN, "You have taken a COLT45 clip from your inventory & reloaded your weapon.");
return 1;
}
Quote:
Edit
Why not also use the function GetPlayerWeaponState and check: pawn Код:
|