09.09.2011, 18:07
Here is an example:
pawn Код:
new Money[MAX_PLAYERS], Skin[MAX_PLAYERS]; // example
ShowPlayerDialog(playerid, 1, ...); // your command
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 1)
{
if(response)
{
Money[playerid] = 500; // example
ShowPlayerDialog(playerid, 2, ...); // shows dialog 2
}
else
{
//
}
}
if(dialogid == 2)
{
if(response)
{
Skin[playerid] = 23;// example
ShowPlayerDialog(playerid, 3, ...); // show dialog 3
}
else
{
//
}
}
if(dialogid == 3)
{
if(response)
{
GivePlayerMoney(playerid, Money[playerid]); // example
SetPlayerSkin(playerid, Skin[playerid]); // example
}
else
{
//
}
}
return 1;
}