27.09.2012, 21:10
pawn Код:
if(strcmp(cmdtext,"/sellak",true)==0)
{
new playerb, bullets, Float:x, Float:y, Float:z;
GetPlayerPos(playerb, x, y, z);
if(gTeam[playerid] != TEAM_GUNDEALERS) return SendClientMessage(playerid,COLOR_RED,"You are not Emmet's Place Worker!");
if(IsPlayerInRangeOfPoint(playerid, 5.0, x, y, z))
{
if(bullets < 1 || bullets > 400) return SendClientMessage(playerid, 0xFF9900AA, "You can only take 1-400 bullets at once!");
SendClientMessage(playerb, 0xFF9900AA, "Emmet Worker has given you a AK-47 and a box of ammo.");
GivePlayerWeapon(playerb, 30, bullets);
GivePlayerMoney(playerid, -500);
}
else SendClientMessage(playerid, COLOR_RED, "You are too far away from that player.");
return 1;
}