I Need help (Dialog's register and login)
#1

Hello, greetings to all, I come to say hello, and ask for help with a problem I have with the pawn, I want to improve my script in the pawn, in this case was reading tutorials forums, but did not find anything to help me, I was registration and income adding to dialogues on my server, but when I enter and register in the tutorial I saw ..

1 .-) When I enter nothing happens I simply connect and close the dialog window

2 .-) When I want to sign, in my case an RP server, not passed to the tutorial, or write the data.

3 .-) If I could give a tutorial explaining how to put registration system and entry dialogs in samp if they would give me a tutorial would be grateful


What more would appreciate now, is to have a tutorial about adding income and record with dialogue but that the errors do not happen and these good without more to say I hope your help ..

Greetings to the scripter!

Sorry for my bad english, I From venezuela. Greeting's!!
Reply
#2

Sorry doble post, my theread is down, plz response me!
Reply
#3

You mean you're trying to add dialogs to your script and it's failing?

If so, show us the code.
Reply
#4

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

Sorry, I don't understand what you're asking/saying.

Are you a native English speaker? If not, you can search the language board for your language and ask in there.
Reply
#6

Sorry for my bad english, im from venezuela, im tryng saying why my words, Hi, mi problem is i have a RolePlay Server And I Add a system of dialog's (Register and Login), But always have a error when i register the server not goes to the tutorial of RP, And i register not Respawn my player.

їYou understandme?...

I Hope your response bye..
Reply
#7

if u want a dialog to appear when a person connects.. its:
pawn Код:
public OnPlayerConnect(playerid)
{
  new test[128];
  format(rules,sizeof(test),"[yourtexthere]");
  ShowPlayerDialog(playerid,[id],DIALOG_STYLE_MSGBOX,"[Your Dialog Title]",test,"Accept","Decline");
    return 1;
}
Reply
#8

Ok i understand what he means. So im going to tell everyone,

He has done the dialog, But when he registers it dosent goto the tutorial like it should

Quote:
Originally Posted by IanDaCJ
if u want a dialog to appear when a person connects.. its:
pawn Код:
public OnPlayerConnect(playerid)
{
  new test[128];
  format(rules,sizeof(test),"[yourtexthere]");
  ShowPlayerDialog(playerid,[id],DIALOG_STYLE_MSGBOX,"[Your Dialog Title]",test,"Accept","Decline");
    return 1;
}
You dont have to use a string just:

pawn Код:
ShowPlayerDialog(playerid, DIALOGID, DIALOG_STYLE_MSGBOX, "Rules", "THERE ARE NO RULES JUST ENJOY! :D", "WOOHOO", "Aww");
Reply
#9

Thanks for your help, I think you know what you do, now I must place this in order to fix my problem, sorry if you are not well understood

This is what I think I have to put your telling me to fix the problem is income and record:

Код:
public OnPlayerConnect(playerid) 
{
  new test[128];
  format(rules,sizeof(test),"[yourtexthere]");
	return 1;
}
Reply
#10

Sorry doble post but, my theread down! xDD! PLz help! :S
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)