29.09.2012, 14:05
Код:
CMD:test(playerid, params[]) { ShowPlayerDialog(playerid,50, DIALOG_STYLE_INPUT, "Show it", "Show me my name and text", "Show me it", "Close"); }
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(dialogid==50) { if(response) { new string[59], myname[MAX_PLAYER_NAME], year ,month, day, hour, minute, second; getdate(year, month, day); gettime(hour, minute, second); GetPlayerName(playerid, myname, sizeof(myname)); format(string, sizeof(string), "Name %s\nTime %i:%i:%i\nDate %i/%i/%i\nText %s", myname, hour, minute, second, day,month,year, inputtext); ShowPlayerDialog(playerid, 51, DIALOG_STYLE_MSGBOX, "Information", "Your Information", "Okay", ""); } } return 1; }