27.07.2012, 22:11
ok so basically i got this /buyguns command but when a player buys them we admins get spammed everytime he switches to a gun he got
command:
command:
pawn Код:
CMD:buyguns(playerid, params[])
{
if(!IsPlayerInRangeOfPoint(playerid, 7.0, 1711.09, -1874.66, 13.61)) return SendClientMessage(playerid, COLOR_RED, "You are not near the gun locker (inside spawn at unity)!");
if(BuyWeaponSet[playerid] == 0)
{
SendClientMessage(playerid, COLOR_RED, "Are you sure you want to buy these weapons they cost $500,000, Type the command again to confirm your purchase.");
SendClientMessage(playerid, COLOR_REALRED, "Please note that these will cost MORE Then buying them individually from a arms dealer.");
BuyWeaponSet[playerid] = 1;
}
else
{
if(GetPlayerMoney(playerid) < 500000)
return SendClientMessage(playerid, COLOR_RED, "You dont have enough money to buy this weapon set!(500k)");
GivePlayerWeapon(playerid, 27, 999999);
GivePlayerWeapon(playerid, 24, 999999);
GivePlayerWeapon(playerid, 34, 999999);
GivePlayerWeapon(playerid, 29, 999999);
GivePlayerWeapon(playerid, 5, 1);
GivePlayerWeapon(playerid, 31, 999999);
GivePlayerCash(playerid, -500000);
SendClientMessage(playerid, COLOR_GREEN, "You have Purchase The Weapon Set for $500k");
BuyWeaponSet[playerid] = 0;
}
return 1;
}