24.05.2009, 13:22
Hey.
How would I make it so, for every different price, if you don't have the correct amount of money you can't buy it?
Thanks in advance and I respect if you don't want to help, because of it being within the GodFather, but it will help for other scripts.
Код:
if (GetPlayerMoney(playerid) > {Amount?} ) { if(strcmp(gunid, "stretch", true, strlen(gunid)) == 0) { SendClientMessage(playerid, COLOR_BLUE, "New Upgrade: Your House Car Is Now A Stretch"); HouseInfo[house][hVec] = 409; GivePlayerMoney(playerid,-50000); } else if(strcmp(gunid, "zr350", true, strlen(gunid)) == 0) { SendClientMessage(playerid, COLOR_BLUE, "New Upgrade: Your House Car Is Now A ZR-350"); HouseInfo[house][hVec] = 477; GivePlayerMoney(playerid,-100000); } else if(strcmp(gunid, "stallion", true, strlen(gunid)) == 0) { SendClientMessage(playerid, COLOR_BLUE, "New Upgrade: Your House Car Is Now A Stallion"); HouseInfo[house][hVec] = 439; GivePlayerMoney(playerid,-150000); } else { SendClientMessage(playerid, COLOR_RED, " You can't afford that {Amount?} "); return 1; } }
Thanks in advance and I respect if you don't want to help, because of it being within the GodFather, but it will help for other scripts.