SA-MP Forums Archive
Keeping the dialog open? - 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: Keeping the dialog open? (/showthread.php?tid=131497)



Keeping the dialog open? - Torran - 03.03.2010

Hello,

Im making a lend command into a dialog and if a player enters a invalid player id it sends a message INVALID PLAYER ID and then the dialog closes,
But how do i keep the dialog open?

Heres the messages bit of my code:

pawn Код:
if (PlayerInfo[playerid][OwnedCar] != 1) SendClientMessage(playerid, RED, "You are not authorized to use this command");
else if (sscanf(inputtext, "u", id)) SendClientMessage(playerid, RED, "Please enter a PlayerID/PartOfName");
else if (id == playerid) SendClientMessage(playerid, RED, "You cannot lend yourself a car");
else if (id == INVALID_PLAYER_ID) SendClientMessage(playerid, RED, "Player not Found");



Re: Keeping the dialog open? - GhoulSlayeR - 03.03.2010

Reshow the dialog.


Re: Keeping the dialog open? - Torran - 03.03.2010

Quote:
Originally Posted by GhoulSlayeR
Reshow the dialog.
This is all you need

pawn Код:
if (PlayerInfo[playerid][OwnedCar] != 1) SendClientMessage(playerid, RED, "You are not authorized to use this command");
else if (sscanf(inputtext, "u", id)) SendClientMessage(playerid, RED, "Please enter a PlayerID/PartOfName");
else if (id == playerid) SendClientMessage(playerid, RED, "You cannot lend yourself a car");
else if (id == INVALID_PLAYER_ID) SendClientMessage(playerid, RED, "Player not Found");



Re: Keeping the dialog open? - Rzzr - 03.03.2010

Please show me your ShowPlayerDialog code so I have the dialogid, your text etc.. , I will help you.


Re: Keeping the dialog open? - Torran - 03.03.2010

ShowPlayerDialog(playerid, Lend, DIALOG_STYLE_INPUT, "Lend your Car", "Please input the PlayerID or PlayerName of the player you want to lend your car to.", "Select", "Cancel");


Re: Keeping the dialog open? - Rzzr - 03.03.2010

pawn Код:
if (PlayerInfo[playerid][OwnedCar] != 1) ShowPlayerDialog(playerid, Lend, DIALOG_STYLE_INPUT, "Lend your Car", "ERROR: You are not authorized to use this!\n\nPlease input the PlayerID or PlayerName of the player you want to lend your car to.", "Select", "Cancel");
else if (sscanf(inputtext, "u", id)) ShowPlayerDialog(playerid, Lend, DIALOG_STYLE_INPUT, "Lend your Car", "ERROR: Please enter a PlayerID/PartOfName\n\nPlease input the PlayerID or PlayerName of the player you want to lend your car to.", "Select", "Cancel");
else if (id == playerid) ShowPlayerDialog(playerid, Lend, DIALOG_STYLE_INPUT, "Lend your Car", "ERROR: You cannot lend yourself a car\n\nPlease input the PlayerID or PlayerName of the player you want to lend your car to.", "Select", "Cancel");
else if (id == INVALID_PLAYER_ID) ShowPlayerDialog(playerid, Lend, DIALOG_STYLE_INPUT, "Lend your Car", "ERROR: Player not Found\n\nPlease input the PlayerID or PlayerName of the player you want to lend your car to.", "Select", "Cancel");
Something like this


Re: Keeping the dialog open? - Torran - 03.03.2010

Nice, thankyou