Dialog Player Name and IP - 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)
+--- Thread: Dialog Player Name and IP (
/showthread.php?tid=637159)
Dialog Player Name and IP -
ajam123 - 09.07.2017
How can I create dialog with Character Name and IP showing up? Example below (in dialog)
pawn Код:
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
pawn Код:
My Roleplay - Login
------------------------------
Your Name: User_Dialog
Your IP: 192.168.1.1
------------------------------
Please enter your password to login:
(XXXXXXXXXXXXX)
Re: Dialog Player Name and IP -
StaticYey - 09.07.2017
PHP код:
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");
Re: Dialog Player Name and IP -
ajam123 - 09.07.2017
thanks.