27.08.2012, 15:58
Quote:
Guys.. It's not that hard to understand lol
- Let's say - now you have a gun and you are fighting with ? K ? and you have a CLIP to INCREASE "INCREASE" your Ammo - So once you use the - the BULLETS [Ammo] IN the WEAPON SHOULD INCREASE - so if you have 10 - it will be 20 - BUT if you have 20 - It will be 30 , Do you get it now ? lol |
Anyway here, i'll show you how it works:
pawn Код:
new ammo = GetPlayerAmmo(playerid); // Save your ammo amount into a variable.
new weapon = GetPlayerWeapon(playerid); // Same with the weapon ID.
ResetPlayerWeapons(playerid); // Remove player weapons. (you might want to ****** for 'RemovePlayerWeapon' function to remove only specific weapon.
GivePlayerWeapon(playerid, weaponid, ammo+10); // Gives the player it's weapon back with old + new (10) ammo.
![Smiley](images/smilies/smile.png)
EDIT: Or, actually by giving the player the same weapon that he already has, will increase the ammo.