25.02.2015, 19:08
I added a bit of command
-/food
Code:
Give Me REP please
-/food
Code:
Code:
CMD:food(playerid,params[]) { if(isnull(params)) { SendClientMessage(playerid, COLOR_LIGHTRED, "Pakai: /food [burger/pizza/chicken]"); } if(strcmp(params,"burger",true) == 0) { if(IsPlayerInRangeOfPoint(playerid, 20, 366.0248, -73.3478, 1001.5078)) { if(GetPlayerMoney(playerid) < 500) return SendClientMessage(playerid, 0xFF0000FF,"| DriveThru | You don't have $500 to buy!"); if(GetPVarInt(playerid,"HUNGER") >= 100) return SendClientMessage(playerid, COLOR_RED,"| HUNGER | You are satisfied, don't need more food!"); GivePlayerMoney(playerid, -2500); GetPlayerHealth(playerid,life),SetPlayerHealth(playerid,life+75.0); SetPVarInt(playerid,"HUNGER",GetPVarInt(playerid,"HUNGER")+80); SetProgressBarValue(PGHUNGER, GetPVarInt(playerid,"HUNGER")); UpdateProgressBar(PGHUNGER,playerid); return SendClientMessage(playerid, COLOR_BLUE, "Thank you for purchasing Burger"); } else return SendClientMessage(playerid, COLOR_BLUE, "You must be in Burger Shot for eat a Burger"); } if(strcmp(params,"pizza",true) == 0) { if(IsPlayerInRangeOfPoint(playerid, 50, 372.3520, -131.6510, 1001.4922)) { if(GetPlayerMoney(playerid) < 500) return SendClientMessage(playerid, 0xFF0000FF,"| DriveThru | You don't have $500 to buy!"); if(GetPVarInt(playerid,"HUNGER") >= 100) return SendClientMessage(playerid, COLOR_RED,"| HUNGER | You are satisfied, don't need more food!"); GivePlayerMoney(playerid, -2500); GetPlayerHealth(playerid,life),SetPlayerHealth(playerid,life+75.0); SetPVarInt(playerid,"HUNGER",GetPVarInt(playerid,"HUNGER")+80); SetProgressBarValue(PGHUNGER, GetPVarInt(playerid,"HUNGER")); UpdateProgressBar(PGHUNGER,playerid); return SendClientMessage(playerid, COLOR_BLUE, "Thank you for purchasing Pizza"); } else return SendClientMessage(playerid, COLOR_BLUE, "You must be in Stacked Pizza untuk fot eat a Pizza"); } if(strcmp(params,"chicken",true) == 0) { if(IsPlayerInRangeOfPoint(playerid, 50, 365.7158, -9.8873, 1001.8516)) { if(GetPlayerMoney(playerid) < 500) return SendClientMessage(playerid, 0xFF0000FF,"| DriveThru | You don't have $500 to buy!"); if(GetPVarInt(playerid,"HUNGER") >= 100) return SendClientMessage(playerid, COLOR_RED,"| HUNGER | You are satisfied, don't need more food!"); GivePlayerMoney(playerid, -2500); GetPlayerHealth(playerid,life),SetPlayerHealth(playerid,life+75.0); SetPVarInt(playerid,"HUNGER",GetPVarInt(playerid,"HUNGER")+80); SetProgressBarValue(PGHUNGER, GetPVarInt(playerid,"HUNGER")); UpdateProgressBar(PGHUNGER,playerid); return SendClientMessage(playerid, COLOR_BLUE, "Thank you for purchasing Chicken"); } else return SendClientMessage(playerid, COLOR_BLUE, "You Must Be in Chickenbell to food a chicken"); } return 1; }