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