OnPlayerText, need advice. +pictures
#1

OK so when you do command for example : "/mdc" textdraw box appears with other textdraws in the box ordered by number.
The textdraws which ordered by numbers are options for the players. example : 1 - Registered houses" -
( Look at the picture below and you will understand )

My question is : The player chooses one of the textdraw options by inserting number between 1-24,
can be found on script under OnPlayerText -- > Code below
pawn Код:
if(Showing[playerid])
  {
    new x = strval(text);
    if(x < 1 || x > 24) return 0;
    switch(x)
    {
      case 1: ShowPlayerDialog(playerid, DialogHouses, DIALOG_STYLE_INPUT, "MDC/Registered houses:", "Type in the name of the suspect", "Search", "Cancel");
      case 2: ShowPlayerDialog(playerid, DialogBusinesses, DIALOG_STYLE_INPUT, "MDC/Registered business:", "Ype in the name of the suspect", "Search", "Cancel");
      case 3: SendClientMessage(playerid, COLOR_LIGHTGREY, "Option is unavailable at the moment.");
      case 4: ShowPlayerDialog(playerid, DialogVehicles, DIALOG_STYLE_INPUT, "MDC/Registered vehicles:", "Type in a name to get information", "Continue", "Cancel");
      case 5: SendClientMessage(playerid, COLOR_LIGHTGREY, "Option is unavailable at the moment.");
      case 6: SendClientMessage(playerid, COLOR_LIGHTGREY, "Option is unavailable at the moment.");
      case 7: SendClientMessage(playerid, COLOR_LIGHTGREY, "Option is unavailable at the moment.");
      case 8: SendClientMessage(playerid, COLOR_LIGHTGREY, "Option is unavailable at the moment.");
      case 9: SendClientMessage(playerid, COLOR_LIGHTGREY, "Option is unavailable at the moment.");
      case 10: SendClientMessage(playerid, COLOR_LIGHTGREY, "Option is unavailable at the moment.");
      case 11: SendClientMessage(playerid, COLOR_LIGHTGREY, "Option is unavailable at the moment.");
      case 12: SendClientMessage(playerid, COLOR_LIGHTGREY, "Option is unavailable at the moment.");
      case 13: SendClientMessage(playerid, COLOR_LIGHTGREY, "Option is unavailable at the moment.");
      case 14: ShowPlayerDialog(playerid, DialogRecord, DIALOG_STYLE_INPUT, "MDC/Convictions:", "Type the name of the suspect", "Search", "Cancel");
      case 15: SendClientMessage(playerid, COLOR_LIGHTGREY, "Option is unavailable at the moment.");
      case 16: SendClientMessage(playerid, COLOR_LIGHTGREY, "Option is unavailable at the moment.");
      case 17: SendClientMessage(playerid, COLOR_LIGHTGREY, "Option is unavailable at the moment.");
      case 18: SendClientMessage(playerid, COLOR_LIGHTGREY, "Option is unavailable at the moment.");
      case 19: SendClientMessage(playerid, COLOR_LIGHTGREY, "Option is unavailable at the moment.");
      case 21: SendClientMessage(playerid, COLOR_LIGHTGREY, "Option is unavailable at the moment.");
      case 22: SendClientMessage(playerid, COLOR_LIGHTGREY, "Option is unavailable at the moment.");
      case 23: SendClientMessage(playerid, COLOR_LIGHTGREY, "Option is unavailable at the moment.");
      case 24: SendClientMessage(playerid, COLOR_LIGHTGREY, "Option is unavailable at the moment.");
      default: SendClientMessage(playerid, 0xFF0000FF, "You must insert a number between 1 and 24!");
    }
    return 0;
  }
  return 0;
}


What I wanna do is when player types in 1-24 it wont write on chat the number he has choosen.

If some one have idea share please Thanks!
Reply


Messages In This Thread
OnPlayerText, need advice. +pictures - by AdamCooper - 20.06.2013, 23:51
Respuesta: OnPlayerText, need advice. +pictures - by JustBored - 21.06.2013, 00:29
Re: OnPlayerText, need advice. +pictures - by AdamCooper - 21.06.2013, 01:00
Re: OnPlayerText, need advice. +pictures - by [ABK]Antonio - 21.06.2013, 01:03

Forum Jump:


Users browsing this thread: 1 Guest(s)