Dialog problem
#7

Quote:
Originally Posted by LTomi
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.
   }
}
EDIT: I've improved the code a bit.
Thanks for the tries dude but It's still setting my color to black o.O
Reply


Messages In This Thread
Dialog problem - by [XST]O_x - 04.06.2010, 14:34
Re: Dialog problem - by ViruZZzZ_ChiLLL - 04.06.2010, 18:37
Re: Dialog problem - by [XST]O_x - 05.06.2010, 13:10
Re: Dialog problem - by ViruZZzZ_ChiLLL - 05.06.2010, 14:57
Re: Dialog problem - by [XST]O_x - 05.06.2010, 15:30
Re: Dialog problem - by LTomi - 05.06.2010, 15:39
Re: Dialog problem - by [XST]O_x - 05.06.2010, 15:53
Re: Dialog problem - by -Rebel Son- - 05.06.2010, 16:17
Re: Dialog problem - by [XST]O_x - 05.06.2010, 16:24
Re: Dialog problem - by [XST]O_x - 06.06.2010, 12:46
Re: Dialog problem - by Nero_3D - 06.06.2010, 13:14
Re: Dialog problem - by [XST]O_x - 06.06.2010, 14:43

Forum Jump:


Users browsing this thread: 1 Guest(s)