27.01.2015, 17:39
pawn Код:
CMD:buyflower(playerid, params[])
{
if(IsPlayerInRangeOfPoint(playerid, 20.0,-103.9105,-22.3268,1000.7188))
{
new string[84];
if (GetPlayerCash(playerid) >= 500)
{
GivePlayerValidWeapon(playerid, 14, 99999);
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
format(string, sizeof(string), "Flower Purchased.");
SendClientMessageEx(playerid, COLOR_GRAD4, string);
if(PlayerInfo[playerid][pDonateRank] >= 4)
{
GivePlayerCash(playerid, -300);
SendClientMessageEx(playerid, COLOR_YELLOW, "VIP: You have received 20 percent off this product. Instead of paying $500, you paid $300.");
}
else
{
GivePlayerCash(playerid, -11000);
}
}
else
{
SendClientMessageEx( playerid, COLOR_WHITE, "You dont have enough cash to buy a flower." );
}
}
return 1;
}