Strings in Dialogs
#2

Just format a string and insert it, example on input
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/test", cmdtext, true) == 0)
    {
        new str[128];
        new pName[MAX_PLAYER_NAME];
        GetPlayerName(playerid, pName, sizeof(pName));
        format(str, sizeof(str), "Welcome to the server %s.", pName);
        ShowPlayerDialog(playerid, 12345, DIALOG_STYLE_INPUT, "Welcome!", str, "Accept", "Cancel"); // Or switch str with title, doesnt really matter
        return 1;
    }
    return 0;
}
EDIT: damn it..vb doesn't have warnings to see if anyone else posted before us -____-
Reply


Messages In This Thread
Strings in Dialogs - by TKZ227 - 11.07.2010, 03:03
Re: Strings in Dialogs - by Toni - 11.07.2010, 03:11
Re: Strings in Dialogs - by TKZ227 - 11.07.2010, 04:10
Re: Strings in Dialogs - by TKZ227 - 11.07.2010, 06:39
Re: Strings in Dialogs - by Grim_ - 11.07.2010, 08:10
Re: Strings in Dialogs - by Toni - 11.07.2010, 17:27

Forum Jump:


Users browsing this thread: 1 Guest(s)