OnPlayerCommand[Help] :P
#1

Possibility to get it run somehow? [Dialog]
Код:
OnPlayerCommandText(playerid,"/register ",inputtext);
Reply
#2

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
  if(strcmp("/register", cmdtext, true, 9) == 0)
  {
    ShowPlayerDialog(playerid, 0, DIALOG_STYLE_INPUT, "Register", "Enter your password below.", "Register", "Cancel");
    return 1;
  }
  return 0;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
  if(dialogid == 0)
  {
    if(response == 1)
    {
      //YOUR REGISTER CODE
    }
  }
  return 1;
}
Reply
#3

Thanks.But that isnt really what i expected as answer.Anyone else?
And Is it possible to show the same Dialog again on another Cmd?
Reply
#4

Bump
Reply
#5

pawn Код:
new cmd[128];
format(cmd, sizeof(cmd), "/register %s", inputtext);
OnPlayerCommandText(playerid,cmd);
If this is what you mean.
Reply
#6

Thank You
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)