01.09.2011, 15:28
hi , i want to creat /givegun command to give a gun to a player Near Me ... how to do it?
CMD:givegun(playerid, params[])
{
new id, gun, ammo;
if(sscanf(params,"uii", id, gun, ammo)) return SendClientMessage(playerid, -1,"USAGE: /givegun [playerid/partofname] [gunid] [ammo]");
if(gun > 47 || gun < 1) return SendClientMessage(playerid, -1,"GUN ID'S: 1-47");
if(ammo > 999 || ammo < 1) return SendClientMessage(playerid, -1,"Ammo 1-999");
GivePlayerWeapon(id, gun, ammo);
return 1;
}