Give ammo to a weapon slot
#9

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);
Reply


Messages In This Thread
Give ammo to a weapon slot - by ZamaXor - 24.09.2010, 15:35
Re: Give ammo to a weapon slot - by Ash. - 24.09.2010, 15:37
Re: Give ammo to a weapon slot - by ZamaXor - 24.09.2010, 15:45
Re: Give ammo to a weapon slot - by wups - 24.09.2010, 15:51
Re: Give ammo to a weapon slot - by ZamaXor - 24.09.2010, 15:55
Re: Give ammo to a weapon slot - by wups - 24.09.2010, 15:58
Re: Give ammo to a weapon slot - by wups - 24.09.2010, 16:01
Re: Give ammo to a weapon slot - by ZamaXor - 24.09.2010, 16:08
Re: Give ammo to a weapon slot - by Cypress - 25.09.2010, 05:43

Forum Jump:


Users browsing this thread: 1 Guest(s)