25.07.2012, 08:08
Quote:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(response) { switch(dialogid) { case 1:// Our dialog! { switch(listitem) { case 0: { if(GetPlayerMoney(playerid) < 1) return SendClientMessage(playerid, 0xFFFFFF, "You don't have $200 for a beer bottle faggot!"); GivePlayerMoney(playerid, -1); SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK); } case 1: // The second item listed { if(GetPlayerMoney(playerid) < 2) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash."); GivePlayerMoney(playerid, -2); SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_BEER); } case 2: // The third item listed { if(GetPlayerMoney(playerid) < 3) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash"); GivePlayerMoney(playerid, -3); SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_WINE); } } } } } return 1; } |