How to restore. - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: How to restore. (
/showthread.php?tid=103398)
How to restore. -
Justsmile - 19.10.2009
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

^^
Re: How to restore. -
kman - 19.10.2009
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
Re: How to restore. -
Justsmile - 20.10.2009
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;
}
}
}
Re: How to restore. -
pagie1111 - 20.10.2009
is it for OnPlayerClickedPlayer?
Re: How to restore. -
Justsmile - 20.10.2009
Yes, but how t restor?