Thanks friend, now listen to me I have a RP server, but the dialogue system on those servers eh I realized that it is different because when you connect your not respawnea the player, and when you sign up you do not pass the tutorial.
I hope you understand .. My code is the pandas I put it to the top:
Код:
forward Loadmsg (playerid);
public Loadmsg (playerid)
(
/ * SendClientMessage (playerid, COLOR_GREEN, "|-<->-<->-<->-<->-<->-<->-<->-<->-<->-<-> -<->-<->-<->-<->-<->-<->-<->-<->-<->-<->-<->-<->-< ->-|");
SendClientMessage (playerid, COLOR_WHITE, "Welcome to invasions Role Play!");
SendClientMessage (playerid, COLOR_WHITE, "We hope you enjoy the server, and visit us in www.gaming-zone.cl!");
SendClientMessage (playerid, COLOR_GREEN, "|-<->-<->-<->-<->-<->-<->-<->-<->-<->-<->-< ->-<->-<->-<->-<->-<->-<->-<->-<->-<->-<->-<->-<-> -|");*/
new plname [MAX_PLAYER_NAME]
new string [256];
GetPlayerName (playerid, plname, sizeof (plname));
format (string, sizeof (string), "users /% s.ini" plname)
if (fexist (string))
(
gPlayerAccount [playerid] = 1;
new loginstring [128];
new loginname [64];
GetPlayerName (playerid, loginname, sizeof (loginname));
format (loginstring, sizeof (loginstring), "Welcome,% s \ nYour nick is registered. \ nIngresa logear password for", loginname);
ShowPlayerDialog (playerid, 12 346, DIALOG_STYLE_INPUT, "Start Session" loginstring, "Connect", "Exit");
TextDrawShowForPlayer (playerid, Text: FondoNegroAbajo)
TextDrawShowForPlayer (playerid, Text: FondoNegroArriba)
return 1;
)
else
(
gPlayerAccount [playerid] = 0;
new regstring [128];
new regname [64];
GetPlayerName (playerid, regname, sizeof (regname));
format (regstring, sizeof (regstring), "Welcome,% s \ nIngresa Register your password to your account:" regname)
ShowPlayerDialog (playerid, 12345, DIALOG_STYLE_INPUT, "Record" regstring, "Record", "Exit");
TextDrawShowForPlayer (playerid, Text: FondoNegroAbajo)
TextDrawShowForPlayer (playerid, Text: FondoNegroArriba)
return 1;
)
) [/ Code]
My OnDialogResponse:
Код:
public OnDialogResponse (playerid, dialogue, response, listitem, inputText [])
(
new SenderName [MAX_PLAYER_NAME]
new string [128];
if (response)
(
if (talks LOGINMENU == | | == Hold converse 12 347)
(
if (strlen (inputText))
(
new tmppass [64];
strmid (tmppass, inputText, 0, strlen (inputText), 255);
Encrypt (tmppass)
OnPlayerLogin (playerid, tmppass)
)
else
(
new loginstring [128];
new loginname [64];
GetPlayerName (playerid, loginname, sizeof (loginname));
format (loginstring, sizeof (loginstring), "Wrong password \ nIngresa the correct password \ not logear", loginname);
ShowPlayerDialog (playerid, 12 347, DIALOG_STYLE_INPUT, "Start Session" loginstring, "Connect", "Exit");
gPlayerLogTries [playerid] + = 1;
/ / If (gPlayerLogTries [playerid] == 4) (Ban (playerid);)
)
)
if (talks == 12345)
(
if (strlen (inputText))
(
GetPlayerName (playerid, SenderName, sizeof (SenderName));
format (string, sizeof (string), "Gz-Rp/Usuarios /% s.ini" SenderName)
new File: hFile = fopen (string, io_read)
if (hFile)
(
SendClientMessage (playerid, COLOR_YELLOW, "This name already exists, please choose another.")
fclose (hFile);
return 1;
)
new tmppass [64];
strmid (tmppass, inputText, 0, strlen (inputText), 255);
Encrypt (tmppass)
OnPlayerRegister (playerid, tmppass)
)
else
(
new regstring [128];
new regname [64];
GetPlayerName (playerid, regname, sizeof (regname));
format (regstring, sizeof (regstring), "Welcome,% s \ nIngresa Register your password to your account:" regname)
ShowPlayerDialog (playerid, 12345, DIALOG_STYLE_INPUT, "Record" regstring, "Record", "Exit");
)
)
if (! strlen (inputText))
(
loginmsg new [] = "Wrong password \ nIngresa the correct password \ not logear:";
ShowPlayerDialog (playerid, 12 347, DIALOG_STYLE_INPUT, "Start Session" loginmsg, "Connect", "Exit");
)
)
return 1;
)
[/ Code]
I hope your help Thanks