07.11.2010, 23:14
pawn Код:
if(dialogid == 6)
{
if(response)
{
if(listitem == 0)
{
if(GetPlayerMoney(playerid) < 100) return SendClientMessage(playerid, red, "You need $100 to buy a snack.");
{
if(Snack[playerid] == 1) return SendClientMessage(playerid, red, "You already have a snack.");
{
SendClientMessage(playerid, green, "You have bought a snack. Use /eatsnack to use it at any time.");
Snack[playerid] = 1;
GivePlayerMoney(playerid, -100);
GetPlayerName(playerid, pname, 24);
format(file, sizeof(file), USER_FILES, pname);
if(!dini_Exists(file))
{
dini_Create(file);
dini_IntSet(file, "Snack", Snack[playerid]);
}
}
}
}
}
}