01.11.2014, 11:17
I fixed it for you. The problem was, when you didn't put the required amount of data types in the sscanf section (you just had an i). I also neatened your code up a little bit for you 
EDIT: I see someone beat me to it as I was replying.

pawn Код:
CMD:giveweapon(playerid,params[])
{
new ID,GUN,AMMO;
if(sscanf(params,"udd", ID, GUN, AMMO)) return SendClientMessage(playerid,-1,"{FF0000}AdmUsage: {15FF00}/GiveWeapon [ID] [Gun ID/Part Of Name] [Ammo]");
if(PlayerInfo[playerid][Admin] < 1) return SendClientMessage(playerid,-1,"{FF0000}You Must Be An Admin To Use This Command.");
else
{
SendClientMessage(playerid, -1, "{FF0000}AdmCmd: {15FF00}You gave a gun to specified player !");
GivePlayerWeapon(ID, GUN, AMMO);
}
return 1;
}