[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
#2

Wrong Section
Should Be In The Tutorial's Section
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)