10.09.2012, 18:23
pawn Код:
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_GAMBLE5, DIALOG_STYLE_MSGBOX, "{0004FF}Fruit {FF00FF}Slot {91FF00}Machine", "{B34242}Berries {91FF00}Apples", "Pull", "");
}
else // Slot Machine (if they pressed ESC)
{
ShowPlayerDialog(playerid, DIALOG_GAMBLE5, DIALOG_STYLE_MSGBOX, "{0004FF}Fruit {FF00FF}Slot {91FF00}Machine", "{B34242}Berries {91FF00}Apples", "Pull", "");
}
}
if(dialogid == DIALOG_GAMBLE2)
{
if(response) // Slot Machine (if they clicked 'Pull', or pressed Enter)
{
ShowPlayerDialog(playerid, DIALOG_GAMBLE4, DIALOG_STYLE_MSGBOX, "{0004FF}Fruit {FF00FF}Slot {91FF00}Machine", "{B34242}Bananas {91FF00}Apples", "Pull", "");
}
else // Slot Machine (if they pressed ESC)
{
ShowPlayerDialog(playerid, DIALOG_GAMBLE4, DIALOG_STYLE_MSGBOX, "{0004FF}Fruit {FF00FF}Slot {91FF00}Machine", "{91FF00}Bananas {D0DB00}Apples", "Pull", "");
}
}
if(dialogid == DIALOG_GAMBLE3)
{
if(response) // Slot Machine (if they clicked 'Pull', or pressed Enter)
{
ShowPlayerDialog(playerid, DIALOG_GAMBLE6, DIALOG_STYLE_MSGBOX, "{0004FF}Fruit {FF00FF}Slot {91FF00}Machine", "{91FF00}Apples {91FF00}Apples", "Pull", "");
}
else // Slot Machine (if they pressed ESC)
{
ShowPlayerDialog(playerid, DIALOG_GAMBLE6, DIALOG_STYLE_MSGBOX, "{0004FF}Fruit {FF00FF}Slot {91FF00}Machine", "{91FF00}Apples {91FF00}Apples", "Pull", "");
}
}
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.");
}
}
if(dialogid == DIALOG_GAMBLE4)
{
if(response) // Slot Machine (if they clicked 'Pull', or pressed Enter)
{
ShowPlayerDialog(playerid, DIALOG_GAMBLE8, DIALOG_STYLE_MSGBOX, "{0004FF}Fruit {FF00FF}Slot {91FF00}Machine", "{91FF00}Bananas {91FF00}Apples {91FF00}Bananas", "Exit", "");
}
else // Slot Machine (if they pressed ESC)
{
ShowPlayerDialog(playerid, DIALOG_GAMBLE8, DIALOG_STYLE_MSGBOX, "{0004FF}Fruit {FF00FF}Slot {91FF00}Machine", "{91FF00}Bananas {91FF00}Apples {91FF00}Bananas", "Exit", "");
}
}
if(dialogid == DIALOG_GAMBLE5)
{
if(response) // Slot Machine (if they clicked 'Pull', or pressed Enter)
{
ShowPlayerDialog(playerid, DIALOG_GAMBLE9, DIALOG_STYLE_MSGBOX, "{0004FF}Fruit {FF00FF}Slot {91FF00}Machine", "{91FF00}Berries {91FF00}Apples {91FF00}Bananas", "Exit", "");
}
else // Slot Machine (if they pressed ESC)
{
ShowPlayerDialog(playerid, DIALOG_GAMBLE9, DIALOG_STYLE_MSGBOX, "{0004FF}Fruit {FF00FF}Slot {91FF00}Machine", "{91FF00}Berries {91FF00}Apples {91FF00}Bananas", "Exit", "");
}
}
if(dialogid == DIALOG_GAMBLE6)
{
if(response) // Slot Machine (if they clicked 'Pull', or pressed Enter)
{
ShowPlayerDialog(playerid, DIALOG_GAMBLE7, DIALOG_STYLE_MSGBOX, "{0004FF}Fruit {FF00FF}Slot {91FF00}Machine", "{91FF00}Apples {91FF00}Apples {91FF00}Apples", "Exit", "");
}
else // Slot Machine (if they pressed ESC)
{
ShowPlayerDialog(playerid, DIALOG_GAMBLE7, DIALOG_STYLE_MSGBOX, "{0004FF}Fruit {FF00FF}Slot {91FF00}Machine", "{91FF00}Apples {91FF00}Apples {91FF00}Apples", "Exit", "");
}
}
if(dialogid == DIALOG_GAMBLE7)
{
if(response) // Slot Machine (if they clicked 'Pull', or pressed Enter)
{
SendClientMessage(playerid,0xFF0000FF,"You won!");
}
else // Slot Machine (if they pressed ESC)
{
SendClientMessage(playerid,0xFF0000FF,"You won!");
}
}
if(dialogid == DIALOG_GAMBLE8)
{
if(response) // Slot Machine (if they clicked 'Pull', or pressed Enter)
{
SendClientMessage(playerid,0xFF0000FF,"You lost!");
}
else // Slot Machine (if they pressed ESC)
{
SendClientMessage(playerid,0xFF0000FF,"You lost!");
}
}
if(dialogid == DIALOG_GAMBLE9)
{
if(response) // Slot Machine (if they clicked 'Pull', or pressed Enter)
{
SendClientMessage(playerid,0xFF0000FF,"You lost!");
}
else // Slot Machine (if they pressed ESC)
{
SendClientMessage(playerid,0xFF0000FF,"You lost!");
}
}
return 0;
}