05.04.2010, 08:36
First of all you should replace
by
Show me your Showplayerdialog drinks and licence
Код:
if(dialogid == drinks && response) // { // switch(listitem) { case 1: { if(GetPlayerMoney(playerid) < 1) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash."); GivePlayerMoney(playerid, -1); SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK); } case 2: { if(GetPlayerMoney(playerid) < 2) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash."); GivePlayerMoney(playerid, -2); SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_BEER); } case 3: { 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; }
Код:
if(dialogid == drinks) // { if(response) { switch(listitem) { case 1: { if(GetPlayerMoney(playerid) < 1) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash."); GivePlayerMoney(playerid, -1); SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK); } case 2: { if(GetPlayerMoney(playerid) < 2) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash."); GivePlayerMoney(playerid, -2); SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_BEER); } case 3: { 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; }