else if(dialogid == DIALOG_ANAME) {
if(!response) ShowPlayerDialog(playerid, 2818, DIALOG_STYLE_INPUT, "Admin Name - Create", "Please enter your desired admin name in the box below.", "Submit", "");
else
{
new
szString[100];
if(isnull(inputtext))
return ShowPlayerDialog(playerid, 2818, DIALOG_STYLE_INPUT, "Admin Name - Create", "Please enter your desired admin name in the box below.", "Submit", "");
format(PlayerInfo[playerid][pAdminName], sizeof(pAdminName), "%s", inputtext);
format(szString, sizeof(szString), "You have set your admin name to %s.", PlayerInfo[playerid][pAdminName]);
SendClientMessage(playerid, -1, szString);
}
}
format(PlayerInfo[playerid][pAdminName], sizeof(PlayerInfo[MAX_PLAYER_NAME][pAdminName]), "%s", inputtext);
format(PlayerInfo[playerid][pAdminName], sizeof(PlayerInfo[playerid][MAX_PLAYER_NAME]), "%s", inputtext);
else if(dialogid == DIALOG_ANAME) {
if(!response) ShowPlayerDialog(playerid, 2818, DIALOG_STYLE_INPUT, "Admin Name - Create", "Please enter your desired admin name in the box below.", "Submit", "");
else
{
new
szString[100];
if(isnull(inputtext))
return ShowPlayerDialog(playerid, 2818, DIALOG_STYLE_INPUT, "Admin Name - Create", "Please enter your desired admin name in the box below.", "Submit", "");
format(PlayerInfo[playerid][pAdminName], sizeof(PlayerInfo[playerid][MAX_PLAYER_NAME]), "%s", inputtext);
format(szString, sizeof(szString), "You have set your admin name to %s.", PlayerInfo[playerid][pAdminName]);
SendClientMessage(playerid, -1, szString);
}
}
format(PlayerInfo[playerid][pAdminName], MAX_PLAYER_NAME, "%s", inputtext);
stock strcpy(dest[], const source[], maxlength=sizeof dest)
strcat((dest[0] = EOS, dest), source, maxlength);
strcpy(PlayerInfo[playerid][pAdminName], inputtext, MAX_PLAYER_NAME);
if(dialogid == DIALOG_ANAME)
{
if(!response) ShowPlayerDialog(playerid, 2818, DIALOG_STYLE_INPUT, "Admin Name - Create", "Please enter your desired admin name in the box below.", "Submit", "");
else
{
new szString[100];
if(!strlen(inputtext)) return ShowPlayerDialog(playerid, 2818, DIALOG_STYLE_INPUT, "Admin Name - Create", "Please enter your desired admin name in the box below.", "Submit", "");
format(PlayerInfo[playerid][pAdminName], 24, "%s", inputtext);
format(szString, sizeof(szString), "You have set your admin name to %s.", PlayerInfo[playerid][pAdminName]);
SendClientMessage(playerid, -1, szString);
}
}
I just tested it and it turned to be like this: (No errors)
pawn Код:
|