[TUTORIAL]Getting things from dialogs
#1

This is a tutorial of getting some thing like weapons,drink etc from dialog.Dialog type must be list
Tutorial Start
First create a dialog like this
Quote:

ShowPlayerDialog(playerid, you like the ID of dialog, DIALOG_STYLE_LIST, "Weapons", "AK47 $7000 Ammo:450", "Choose", "Cancle");

This shows that AK47 for price $7000 and his ammo is 450.now question is how we get it.To get it follow this tutorial
Quote:

public OnPlayerDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == the id of dialog you typed)
{
if(response)
{
switch(listitem)
{
case 0://it means item number
{
//The thing you want to do if the player select item
}
}
}
}
return 1;
}

The spaces i gave in quote it can't be displayed
THE END
Reply


Messages In This Thread
[TUTORIAL]Getting things from dialogs - by BlackHorse - 05.05.2013, 12:42
Re: [TUTORIAL]Getting things from dialogs - by BlazingKnife - 05.05.2013, 12:47

Forum Jump:


Users browsing this thread: 1 Guest(s)