30.04.2012, 23:14
Hi im making a dialog how can I make a [NEXT] so when a player presses it, it brings him to another page like this.
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == russianbar)
{
if(response)
{
switch(listitem)
{
case 0:
{
if(GetPlayerMoney(playerid) < 25) return SendClientMessage(playerid, 0xFF0000FF, "You don't have enough cash.");
GivePlayerMoney(playerid, -25);
GetPlayerHealth(playerid,hp);
SetPlayerHealth(playerid,hp+15);
ApplyAnimation(playerid,"VENDING","VEND_Drink2_P",4.1,0,1,1,1,1,1);
}
case 1:
{
if(GetPlayerMoney(playerid) < 50) return SendClientMessage(playerid, 0xFF0000FF, "You don't have enough cash.");
GivePlayerMoney(playerid, -50);
GetPlayerHealth(playerid,hp);
SetPlayerHealth(playerid,hp+25);
ApplyAnimation(playerid,"VENDING","VEND_Drink2_P",4.1,0,1,1,1,1,1);
}
case 2:
{
if(GetPlayerMoney(playerid) < 15) return SendClientMessage(playerid, 0xFF0000FF, "You don't have enough cash.");
GivePlayerMoney(playerid, -15);
GetPlayerHealth(playerid,hp);
SetPlayerHealth(playerid,hp+35);
ApplyAnimation(playerid,"VENDING","VEND_Drink2_P",4.1,0,1,1,1,1,1);
}
case 3:
{
if(GetPlayerMoney(playerid) < 75) return SendClientMessage(playerid, 0xFF0000FF, "You don't have enough cash.");
GivePlayerMoney(playerid, -75);
GetPlayerHealth(playerid,hp);
SetPlayerHealth(playerid,hp+40);
ApplyAnimation(playerid,"VENDING","VEND_Drink2_P",4.1,0,1,1,1,1,1);
}
case 4:
{
if(GetPlayerMoney(playerid) < 100) return SendClientMessage(playerid, 0xFF0000FF, "You don't have enough cash.");
GivePlayerMoney(playerid, -100);
GetPlayerHealth(playerid,hp);
SetPlayerHealth(playerid,hp+50);
ApplyAnimation(playerid,"VENDING","VEND_Drink2_P",4.1,0,1,1,1,1,1);
}
}
}
return 1;
}