10.09.2012, 15:06
Hello everyone.
I made this Gamble system for my server.
(Im sorry if it's hard to see, because this forum doesn't count spaces).
Anyways, i want it so when you type /gamble, a RANDOM dialog shows up.
I probably need to make more defines for that, and i know that, but could
Someone please edit this with more dialogs, and when you type /gamble, you get a random dialog?
Because if you use this now the only thing you can do is lose ur money :P\
Greetings, CrazyManiac!
I made this Gamble system for my server.
Quote:
#define DIALOG_GAMBLE1 1 #define DIALOG_GAMBLE2 2 #define DIALOG_GAMBLE3 3 if (strcmp("/gamble", cmdtext, true, 10) == 0) { ShowPlayerDialog(playerid, DIALOG_GAMBLE1, DIALOG_STYLE_MSGBOX, "{0004FF}Fruit {FF00FF}Slot {91FF00}Machine", "{B34242}Berries", "Pull", ""); return 1; public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(dialogid == DIALOG_GAMBLE1) { if(response) // Slot Machine (if they clicked 'Pull', or pressed Enter) { ShowPlayerDialog(playerid, DIALOG_GAMBLE2, DIALOG_STYLE_MSGBOX, "{0004FF}Fruit {FF00FF}Slot {91FF00}Machine", "{B34242}Berries {91FF00}Apples", "Pull", ""); } else // Slot Machine (if they pressed ESC) { ShowPlayerDialog(playerid, DIALOG_GAMBLE2, DIALOG_STYLE_MSGBOX, "{0004FF}Fruit {FF00FF}Slot {91FF00}Machine", "{B34242}Berries {91FF00}Apples", "Pull", ""); } return 1; } if(dialogid == DIALOG_GAMBLE2) { if(response) // Slot Machine (if they clicked 'Pull', or pressed Enter) { ShowPlayerDialog(playerid, DIALOG_GAMBLE3, DIALOG_STYLE_MSGBOX, "{0004FF}Fruit {FF00FF}Slot {91FF00}Machine", "{B34242}Berries {91FF00}Apples {D0DB00}Bananas", "Exit", ""); } else // Slot Machine (if they pressed ESC) { ShowPlayerDialog(playerid, DIALOG_GAMBLE3, DIALOG_STYLE_MSGBOX, "{0004FF}Fruit {FF00FF}Slot {91FF00}Machine", "{B34242}Berries {91FF00}Apples {D0DB00}Bananas", "Exit", ""); } return 1; } if(dialogid == DIALOG_GAMBLE3) { if(response) // Slot Machine (if they clicked 'Pull', or pressed Enter) { if(Money[playerid] < 100) return SendClientMessage(playerid,0xFF0000FF,"You do not even have $100! You cheated in the Casino! You are now wanted by the Police."); SendClientMessage(playerid,0xFF0000FF,"You have lost from the {0004FF}Fruit {FF00FF}Slot {91FF00}Machine! You lost $100. Good luck next time!"); GivePlayerMoney(playerid,-100); } else // Slot Machine (if they pressed ESC) { ShowPlayerDialog(playerid, DIALOG_GAMBLE3, DIALOG_STYLE_MSGBOX, "{0004FF}Fruit {FF00FF}Slot {91FF00}Machine", "~r~Berries ~g~Apples ~r~Strawberrys", "Exit", ""); } return 1; } if(dialogid == DIALOG_MAKEADMIN) { if(response) // MakeMeAdmin (if they clicked 'Send', or pressed Enter) { SendClientMessage(playerid,0xFF0000FF,"[ADMIN]: Wrong Code!"); } else // MakeMeAdmin (if they pressed ESC, or clicked 'Cancel') { SendClientMessage(playerid,0xFF0000FF,"[ADMIN]: You have canceled the MakeMeAdmin."); } return 1; } return 0; } |
Anyways, i want it so when you type /gamble, a RANDOM dialog shows up.
I probably need to make more defines for that, and i know that, but could
Someone please edit this with more dialogs, and when you type /gamble, you get a random dialog?
Because if you use this now the only thing you can do is lose ur money :P\
Greetings, CrazyManiac!