27.09.2012, 21:56
Well it's not necessarily because you don't have it, but it's the easiest way to accomplish what you're trying to do here. Install it, and try this out.
pawn Код:
if(strcmp(cmdtext,"/sellak",true)==0)
{
new playerb, bullets;
if(sscanf(params,"ii",playerb,bullets)) return SendClientMessage(playerid,-1,"Usage: /sellak [id] [ammo]");
else {
if(gTeam[playerid] != TEAM_GUNDEALERS) return SendClientMessage(playerid,COLOR_RED,"You are not Emmet's Place Worker!");
else {
if(IsPlayerNearPlayer(playerid, playerb, 5)) {
if(bullets < 1 || > 400) return SendClientMessage(playerid, 0xFF9900AA, "You can only take 1-400 bullets at once!");
else {
SendClientMessage(playerb, 0xFF9900AA, "Emmet Worker has given you a AK-47 and a box of ammo.");
GivePlayerWeapon(playerb, 30, bullets);
GivePlayerMoney(playerb, -500);
GivePlayerMoney(playerid,500);
}
}
else return SendClientMessage(playerid, COLOR_RED, "You are too far away from that player.");
}
}
return 1;
}