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;
}
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)");
GivePlayerValidWeapon(playerid, 27, 999999);
GivePlayerValidWeapon(playerid, 24, 999999);
GivePlayerValidWeapon(playerid, 34, 999999);
GivePlayerValidWeapon(playerid, 29, 999999);
GivePlayerValidWeapon(playerid, 5, 1);
GivePlayerValidWeapon(playerid, 31, 999999);
GivePlayerCash(playerid, -500000);
SendClientMessage(playerid, COLOR_GREEN, "You have Purchase The Weapon Set for $500k");
BuyWeaponSet[playerid] = 0;
}
return 1;
}
You'll have to chenge the basic GivePlayerWeapon function to your script anti hacking one.
|