How to restore.
#1

How to restore a ID of a player?

i have

new SAVEINPUT[MAX_PLAYERS];

SAVEINPUT[playerid] = strval(inputtext),

then

SAVEINPUT[playerid] != INVALID_PLAYER_ID

but i can type in what i want ^^
Reply
#2

what do you mean ?if i go on server i have id 1 and if i leave and come back i still have id 1
Reply
#3

no i want to save the id of a player to use it in another command.

pawn Code:
if(dialogid == 41)
    {
      if(response)
      {
        if(IsNumeric(inputtext))
        {
          if(strval(inputtext) != INVALID_PLAYER_ID)
          {
            SAVEINPUT[playerid] = strval(inputtext);
            format(string, sizeof(string), "Tippe das Level des Spielers ein:");
            ShowPlayerDialog(playerid, 42, DIALOG_STYLE_INPUT, "Level - eingeben des levels", string, "Weiter","Abbrechen");
            return 1;
            }
            else return SendClientMessage(playerid, COLOR_GRAD2, "Wrong ID");
        }
    }
    }
    if(dialogid == 42)
    {
      if(response)
      {
        if(IsNumeric(inputtext))
        {
          if(strval(inputtext) < 0)
          {
            SendClientMessage(playerid, COLOR_GRAD2, "Falsche Eingabe.");
            return 1;
        }
        if(SAVEINPUT[playerid] != INVALID_PLAYER_ID)
        {
          GetPlayerName(SAVEINPUT[playerid], sendername, sizeof(sendername));
          PlayerInfo[SAVEINPUT[playerid]][pLevel] = strval(inputtext);
                    format(string, sizeof(string), "* Du hast das Level von %s auf %d gesetzt",sendername, strval(inputtext));
                    format(string2,sizeof(string2), "You level was set to %d", strval(inputtext));
                    SendClientMessage(playerid, COLOR_GRAD2, string);
                    SendClientMessage(SAVEINPUT[playerid], COLOR_GRAD2, string2);
            return 1;
                }
        }
    }
    }
    if(dialogid == 40)
    {
      if(response)
      {
        if(listitem == 0)
        {
          format(string, sizeof(string), "Tippe die ID des Spielers ein:");
          ShowPlayerDialog(playerid, 41, DIALOG_STYLE_INPUT, "Level - eingeben der ID", string, "Weiter","Abbrechen");
          return 1;
        }
        }
    }
Reply
#4

is it for OnPlayerClickedPlayer?
Reply
#5

Yes, but how t restor?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)