24.09.2010, 15:35
Hello,
I want to give player ammo to a weapon slot. I check if player has got the right weapon. But it gives player the ammo if he hasn't got the right weapon slot. The script not checks for the weapon.
I want to give player ammo to a weapon slot. I check if player has got the right weapon. But it gives player the ammo if he hasn't got the right weapon slot. The script not checks for the weapon.
pawn Код:
if(GetPlayerWeapon(playerid) == 29) return SendClientMessage(playerid, COLOR_LRED, "You don't have the right weapon for this kind of ammo.");
{
GivePlayerMoney(playerid, -500);
new Ammo = GetPlayerAmmo(playerid);
SetPlayerAmmo(playerid, 29, Ammo+20);