11.12.2010, 13:35
How can i change it so i need to press at "The Commands", then the other "COMMAND" show, Like this:
1. Click on playerID
2. Then THIS! show up
3. After you clicked on "MY COMMANDS"
4. Then should THIS! show
1. Click on playerID
2. Then THIS! show up
3. After you clicked on "MY COMMANDS"
4. Then should THIS! show
pawn Код:
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
if(IsPlayerAdmin(playerid))
{
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "COMMAND?", "COMMAND\nCOMMAND\nCOMMAND\nCOMMAND\nCOMMAND\nCOMMAND\nCOMMAND\nCOMMAND\nCOMMAND\nCOMMAND\nCOMMAND\nCOMMAND\nCOMMAND", "ok", "Cancel");
new id = strval(tmp);
if(!IsPlayerConnected(id)) return SendClientMessage(playerid,0xFF0000FF,"Invalid ID");
}
return 0;
}
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(response)
{
switch(dialogid)
{
case 1:
{
switch(listitem)
{
case 0:
{
//my command
}
case 1:
{
//my command
}
case 2:
{
//my command
}
case 3:
{
//my command
}
case 4:
{
//my command
}
case 5:
{
//my command
}
case 6:
{
//my command
}
case 7:
{
//my command
}
case 8:
{
//my command
}
case 9:
{
//my command
}
case 10:
{
//my command
}
case 11:
{
//my command
}
case 12:
{
//my command
}
}
}
}
}
return 1;
}