Keeping the dialog open?
#1

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");
Reply
#2

Reshow the dialog.
Reply
#3

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");
Reply
#4

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

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");
Reply
#6

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
Reply
#7

Nice, thankyou
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)