30.04.2013, 09:55
Hello i wnana ask u guys today if it is possible to add player name strings (%s) on dialogs.
If not, how do people do it?
Thanks
If not, how do people do it?
Thanks

new my_dialog_string[60], name[24]; GetPlayerName(playerid, name, 24);
format(my_dialog_string, 60, "Hello %s!", name);
ShowPlayerDialog(playerid, DIALOG_WHATEVER_ID, DIALOG_STLYE_MESSAGE, my_dialog_string, ... );
new string[128], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "%s", name);
ShowPlayerDialog(playerid, [yourdialogid], DIALOG_STYLE_MSGBOX, "Name",string,"Done","Cancel");
new string[115],pname[24];//The dialog string and the player name string.
GetPlayerName(playerid,pname,sizeof(pname));//Getting the playername
format(string,sizeof(string),"Your name is %s",pname);//This will get the player name and the out put coulf be what ever you want, ClientMessage,GameText,Textdraw ect..
ShowPlayerDialog(playerid, 450, DIALOG_STYLE_MSGBOX, ".::Your dialog title::." ,string, "Close" , "" );//This will be the output, it will be sent as a Dialog.
new string[128], pName[24];
GetPlayerName(playerid, pName, sizeof(pName));
format(string, sizeof string, "Welcome %s to i'm trap server", pName);
ShowPlayerDialog(playerid, 0, DIALOG_STYLE_MSGBOX, "Test Dialog", string, "Noob", "NVM");
new str[128], str2[128], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
format(str, sizeof(str), "my name is: %s", name);
format(str2, sizeof(str2), "my id is: %d", playerid);
ShowPlayerDialog(playerid, DIALOG_ID, DIALOG_STYLE_INPUT, str, str2, "Okay", "Close");
#define PTD 123
new PT[70], ptname[24];
GetPlayerName(playerid, ptname, sizeof(ptname));
format(PT,sizeof(PT),"Your name is %s",ptname);
ShowPlayerDialog(playerid, PTD, DIALOG_STYLE_MSGBOX, ".... Your Name ...." , PT, "OK" , "" );