PDA

View Full Version : Dialog Player Name and IP


ajam123
09/07/2017, 11:30 PM
How can I create dialog with Character Name and IP showing up? Example below (in dialog)

ShowPlayerDialog(playerid, 2, DIALOG_STYLE_PASSWORD, "{4985d7}My Roleplay {a7c2e6} - Login", Please enter your password to login\nIf you have lost it, please contact server manager!", "Login", "Cancel");


Convert to


My Roleplay - Login
------------------------------
Your Name: User_Dialog
Your IP: 192.168.1.1
------------------------------

Please enter your password to login:
(XXXXXXXXXXXXX)

StaticYey
09/07/2017, 11:37 PM
new playerName[MAX_PLAYER_NAME], playerIP[16];

GetPlayerName(playerid, playerName, sizeof(playerName));
GetPlayerIp(playerid, playerIP, sizeof(playerIP));
format(string, sizeof(string), "Your Name: %s\nYour IP: %s\n\nPlease enter your password to login:", playername, playerIP);

ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "My Roleplay - Login", string, "Enter", "Exit");

ajam123
10/07/2017, 12:32 AM
thanks.