11.03.2012, 14:45
On top:
Your command:
and then your dialog:
Hope it'll help.
pawn Код:
#define DIALOG_TEAMS 1
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/teams", cmdtext, true, 10) == 0) //The command
{
ShowPlayerDialog(playerid,1,DIALOG_STYLE_MSGBOX,"{FFFFFF}Available Teams on World War 23 TDM Server.","{00FF00}United States of America \n{FFFF00}United Arab Emirates \n{FF0000}Russian Federation \n{FFFFFF}United Asian Forces \n{008000}European Alliance \n{FF4040}North/South Poles","Okay","Okay");
return 1;
}
return 0;
}
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid==1) // The response
{
if(response)
{
SendClientMessage(playerid,0x00FF00FF,"Good that you understand! Now proceed to battle zone and fight the others!");
return 1;
}
else
{
SendClientMessage(playerid,0x00FF00FF,"Good that you understand! Now proceed to battle zone and fight the others!");
return 1;
}
}
return 1;
}