SA-MP Forums Archive
weapon exception - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: weapon exception (/showthread.php?tid=149370)



weapon exception - shoru93 - 21.05.2010

dcmd_getgun(playerid, params[])
{
new Weapon, Ammo;
if(sscanf(params, "dd", Weapon, Ammo)) return SendClientMessage(playerid, COLOR_GREEN, "Usage: /getgun (weapon id) (bullets)");
if(!IsValidWeapon(Weapon)) return SendClientMessage(playerid, COLOR_RED, "Invalid Weapon ID.");

GivePlayerWeapon(playerid, Weapon, Ammo);
return 1;
}


How do I remove /getgun 38 and 37?


Re: weapon exception - [HiC]TheKiller - 21.05.2010

pawn Код:
dcmd_getgun(playerid, params[])
{
  new Weapon, Ammo;
  if(sscanf(params, "dd", Weapon, Ammo)) return SendClientMessage(playerid, COLOR_GREEN, "Usage: /getgun (weapon id) (bullets)");
  if(Weapon == 38 || Weapon == 37) return SendClientMessage(playerid, COLOR_RED, "You are not allowed a minigun or rocket launcher >=]");
  if(!IsValidWeapon(Weapon)) return SendClientMessage(playerid, COLOR_RED, "Invalid Weapon ID.");

  GivePlayerWeapon(playerid, Weapon, Ammo);
  return 1;
}