02.09.2014, 19:28
Hello everyone,
I have a serious problem today. When I made registery system and then made DS(DealerShip) sytem with dialog, it caused bugs cause when u press ESC in the DS Dialog, you get auto kicked from the server. After checking it for 2 days. I saw that the problem was because from the login/register system. Because in the end after long time editing, I got a dialog to enter my account password to login while i was already logged on. I need you to help me with fixing it cause i don't know how. And What I want to is to edit that when I press ESC or NO in the DS System, it doesn't cause me auto kicked from the server. Also, I want that when someone press ESC While register/login, the dialog shows about 10 times and then, he get auto kicked. + If he stay for more than 30 seconds = Kick.
Here is my Register/Login :
And as I always do, I give +REP to all the people who helped me, and their help was useful !
I have a serious problem today. When I made registery system and then made DS(DealerShip) sytem with dialog, it caused bugs cause when u press ESC in the DS Dialog, you get auto kicked from the server. After checking it for 2 days. I saw that the problem was because from the login/register system. Because in the end after long time editing, I got a dialog to enter my account password to login while i was already logged on. I need you to help me with fixing it cause i don't know how. And What I want to is to edit that when I press ESC or NO in the DS System, it doesn't cause me auto kicked from the server. Also, I want that when someone press ESC While register/login, the dialog shows about 10 times and then, he get auto kicked. + If he stay for more than 30 seconds = Kick.
Here is my Register/Login :
pawn Код:
if (gPlayerAccount[playerid] != 0)
{
new loginstring[256];
new loginname[64];
GetPlayerName(playerid,loginname,sizeof(loginname));
format(loginstring,sizeof(loginstring),"{FFFFFF}Welcome, {6EF83C}%s {FFFFFF}!\n{FFFFFF}That nick is registered !\n{FFFFFF}Your last login time was to: {00C0FF}%s {FFFFFF}!\n{FFFFFF}You can now login:",loginname,dini_Get(LFile(playerid),"LoginDate"));
ShowPlayerDialog(playerid,12346,DIALOG_STYLE_INPUT,"Login",loginstring,"Login","Exit");
}
else
{
gPlayerAccount[playerid] = 0;
new regstring[256];
new regname[64];
GetPlayerName(playerid,regname,sizeof(regname));
format(regstring,sizeof(regstring),"{FFFFFF}Welcome, {F81414}%s {FFFFFF}!\n{FFFFFF}That nick is not registered !\nPlease register:",regname);
ShowPlayerDialog(playerid,12345,DIALOG_STYLE_INPUT,"Register",regstring,"Register","Exit");
}