new string[128];
format(string,128,"1. Change Name\n2. Change Password");
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Account Settings", string, "Change", "Close");
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch(dialogid)
{
case 1: // DIALOG ID. IT'S BETTER TO USE DEFINES IF YOU DON'T USE EASYDIALOG
{
if(response)
{
if(GetPlayerMoney(playerid) < 1000) return SendClientMessage(playerid, -1, "ERROR: You don't have enough cash.");
switch(lisitem)
{
case 0: // Listitem 1
{
// ..
}
case 1: // Listitem 2
{
// ..
}
}
}
}
return 1; // We handled a dialog, so return 1.
}
return 0; // You MUST return 0 here!
}
Hi mates
Example Dialog Code: PHP код:
How i do that? Thank You, Help Please. |
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Account Settings", "1. Change Name\n2. Change Password", "Change", "Close");
Thank You but i know this i want that id cash is less than $1000 then first list item can't be clickable means shows in dialog list but not clickable instead of error msg.
|
case 0:
{
if(GetPlayerMoney(playerid) < 1000) return ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Account Settings", "1. Change Name\n2. Change Password", "Change", "Close");
//if got 1000 or above code here
}