String problem
#7

You should always return 0 at the end of the OnDialogResponse callback so it will allow the callback to be called in other scripts too. Use some other number for the dialogid - a bit longer such as 312 so it won't confict with any other. A suggestion too: switch is faster and better in case you add more dialogs.

pawn Code:
//Under the CMD
ShowPlayerDialog(playerid, 312, DIALOG_STYLE_INPUT, "Advertisment", "Please enter your Advertisment:", "Enter", "Cancel");

//Under OnDialog Responce
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    switch (dialogid)
    {
        case 312:
        {
            if (response)
            {
                new string[144];
                format(string, sizeof(string),"[ADVERTISMENT]:%s", inputtext);
                SendClientMessageToAll(0x00F250FF, string);
            }
        }
    }
    return 0;
}
Reply


Messages In This Thread
String problem - by Xenforox - 29.04.2014, 11:53
Re: String problem - by vassilis - 29.04.2014, 11:59
Re: String problem - by Konstantinos - 29.04.2014, 12:00
Re: String problem - by Xenforox - 29.04.2014, 12:08
Re: String problem - by Konstantinos - 29.04.2014, 12:14
Re: String problem - by Xenforox - 29.04.2014, 12:25
Re: String problem - by Konstantinos - 29.04.2014, 14:39

Forum Jump:


Users browsing this thread: 1 Guest(s)