05.06.2010, 15:39
pawn Code:
if(dialogid == NAME_COLOR3)
{
if(response == 1) // Player has chosen the left button.
{
if(!strlen(inputtext))
{
SendClientMessage(playerid, COLOR_RED, "You left the input field blank.");
ShowPlayerDialog(playerid, NAME_COLOR3, DIALOG_STYLE_INPUT, ... ); // Basically the dialog dissappears, so we show it again to let the player write the color ID in and send it again.
}
else
{
// You can use the IsNumeric function here to check if the inputtext is a number or not.
SetPlayerColor(playerid,strval(inputtext));
}
}
else // Player has chosen the right button.
{
// Do something here.
}
}