18.07.2015, 12:53
pawn Код:
if(dialogid == PIZZASTACKMENU)
{
new Float:health;
if(response)
{
if(listitem == 0)
{
if(GetPlayerCash(playerid) >= 25) return SendClientMessage(playerid, COLOR_WHITE, " You don't have enough money to do this.");
GetPlayerHealth(playerid, health);
if(health <= 80)
{
SetPlayerHealth(playerid, health+20);
}
else
{
SetPlayerHealth(playerid, 100);
}
GivePlayerCash(playerid, -25);
ApplyAnimation(playerid, "FOOD", "EAT_Pizza",4.1,0,1,1,0,0);
}
if(listitem == 1)
{
if(GetPlayerCash(playerid) >=35) return SendClientMessage(playerid, COLOR_WHITE, " You don't have enough money to do this.");
GetPlayerHealth(playerid, health);
if(health <= 70)
{
SetPlayerHealth(playerid, health+30);
}
else
{
SetPlayerHealth(Playerid, 100);
}
GivePlayerCash(playerid, -35);
ApplyAnimation(playerid, "FOOD", "EAT_Pizza",4.1,0,1,1,0,0);
}
if(listitem == 2)
{
if(GetPlayerCash(playerid) >=35) return SendClientMessage(playerid, COLOR_WHITE, " You don't have enough money to do this.");
GetPlayerHealth(playerid, health);
if(health <=70)
{
SetPlayerHealth(playerid, health+30);
}
else
{
SetPlayerHealth(playerid, 100);
}
GivePlayerCash(playerid, -45);
ApplyAnimation(playerid, "FOOD", "EAT_Pizza",4.1,0,1,1,0,0);
}
}
}