01.03.2011, 20:52
I am trying to get this Dialog working.
And this bit was from SAMP Wiki.
I get no errors but when i go in game it doesn't work. Anyone know the problem?
pawn Code:
command(help, playerid, params[])
{
{
ShowPlayerDialog( playerid, 100, DIALOG_STYLE_LIST, "Help Menu", "Commands\nRules\n", "Select", "Cancel" );
}
return 1;
}
And this bit was from SAMP Wiki.
pawn Code:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch(100)
{
case 1:
{
if(!response)
{
SendClientMessage(playerid, YELLOW, "You cancelled.");
return 1;
}
switch(listitem)
{
case 0:
{
SendClientMessage(playerid, YELLOW, "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" );
SendClientMessage(playerid, WHITE, "commands go here" );
SendClientMessage(playerid, YELLOW, "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" );
}
case 1:
{
SendClientMessage(playerid, YELLOW, "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" );
SendClientMessage(playerid, WHITE, "rules go here" );
SendClientMessage(playerid, YELLOW, "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" );
}
}
}
}
return 1;
}