Registration Problem
#1

i need when player come and when don't have account i want registration dialog for this player but i don't know how to add it , tell me what i need to post from script
Reply
#2

Here's what everyone uses for their script buddy.
https://sampforum.blast.hk/showthread.php?tid=273088

Rep only if i helped.
Reply
#3

it is hard high for me
Reply
#4

Quote:
Originally Posted by Mijata
Посмотреть сообщение
it is hard high for me
Just copy and paste it in your script, Follow the guide, That's the only way you'll learn how to script, Nothing is easy.
Reply
#5

i have already look

Quote:

/*Dialogs ID(s)*/
#define DIALOG_REGISTER 1995
#define DIALOG_LOGIN 1996
#define JDIALOGS 2000
#define DIALOG_PRIVATE_MESSAGE 1997

Quote:

public OnPlayerConnect(playerid)
{
[ if(strlen(aka) > 70)
{
strmid(Jstring,aka,0,70);
format(Jstr, sizeof(Jstr),"Sign in >> Player: %s - IP: %s - AKA: %s", GetName(playerid),playerIP , Jstring);
SendToAdmins(Cmdcolor,Jstr);
strmid(Jstring,aka,70,sizeof(aka));
format(Jstr, sizeof(Jstr),"%s", Jstring);
SendToAdmins(Cmdcolor,Jstr);
}
else
{
if(strlen(aka) > 2) format(Jstr, sizeof(Jstr),"Sign in >> Player: %s - IP: %s - AKA: %s", GetName(playerid),playerIP , aka);
else format(Jstr, sizeof(Jstr),"Sign in >> Player: %s - IP: %s - AKA: No aka found!", GetName(playerid),playerIP);
SendToAdmins(Cmdcolor,Jstr);
}
format(Jfile, 100, ACCOUNTS_PATH, GetName(playerid));
if(!fexist(Jfile))
{
format(Jstring, sizeof(Jstring),"Nick name \"%s\" isn't registered. Please register your nick name to save your status\nEnter the password:", GetName(playerid));
if(MustRegister == 1) ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD,"Register an account!", Jstring, "Register", "Kick");
SendClientMessage(playerid,red,"Nick name isn't registered!");
SendClientMessage(playerid,lighterblue,"Please register to create an account (/register)");
}
else
{
pInfo[playerid][Registered] = 1;
format(Jfile, 100, ACCOUNTS_PATH, GetName(playerid));
INI_ParseFile(Jfile, "GetPlayerInfo", .bExtra = true, .extra = playerid);
if(AutoLogin == 1 && (!strcmp(pIP, pInfo[playerid][IP],true) && pInfo[playerid][pAutoLogin] == 1))
{
format(Jfile, 100, ACCOUNTS_PATH, GetName(playerid));
INI_ParseFile(Jfile, "LoginPlayer", .bExtra = true, .extra = playerid);
SetPlayerScore(playerid, pInfo[playerid][Score]);
GivePlayerMoney(playerid, pInfo[playerid][Cash]);
pInfo[playerid][Logged] = 1;
if(pInfo[playerid][pLevel] >= 1)
{
switch(pInfo[playerid][pLevel])
{
case 1: LevelName = ADMIN_LEVEL_1;
case 2: LevelName = ADMIN_LEVEL_2;
case 3: LevelName = ADMIN_LEVEL_4;
case 4: LevelName = ADMIN_LEVEL_3;
case 5: LevelName = ADMIN_LEVEL_5;
default: LevelName = ADMIN_LEVEL_6;
}
format(Jstring, sizeof(Jstring),"Welcome back, You have been automatically logged in! | Level: %d (%s)", pInfo[playerid][pLevel], LevelName);
SendClientMessage(playerid,lighterblue,Jstring);
}
else
SendClientMessage(playerid,lighterblue,"Welcome back, You have been automatically logged in!");
}
else
{
#if LoginTextDraw == false
format(Jstring, sizeof(Jstring),"Nick name \"%s\" registered.\nPlease enter your password to login", GetName(playerid));
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD,"Account Login", Jstring, "Login", "Quit");
#endif
SendClientMessage(playerid,lighterblue,"Nick name is registered!");
SendClientMessage(playerid,red,"Please '/login' access your account");
}
}
if(ForbiddenNamesKick == 1 && IsForbiddenNick(playerid) == 1)
{
format(Jstring, sizeof(Jstring),"{FB0404}Your nick name \"%s\" is in blacklist. please relog\nwith a new nick name", GetName(playerid));
ShowPlayerDialog(playerid, JDIALOGS+45, DIALOG_STYLE_MSGBOX," {FB0404}Forbidden nick", Jstring, "Ok", "");
SetTimerEx("KickPlayer",200,false,"d", playerid);
format(Jstring, sizeof(Jstring),"\"%s\" has been automatically kicked | reason: 'Forbidden Name'", GetName(playerid));
SendToAdmins(orange,Jstring);
WriteToLog(Jstring,"KickLog");
}
if(KickPartNicks == 1 && IsBadNickPart(playerid) == 1)
{
format(Jstring, sizeof(Jstring),"{FB0404}Your nick name part \"%s\" is in Forbidden part nick names list.\nplease relog with a new nick name", BadNickParts[BadPartID]);
ShowPlayerDialog(playerid, JDIALOGS+45, DIALOG_STYLE_MSGBOX," {FB0404}Forbidden part nick", Jstring, "Ok", "");
SetTimerEx("KickPlayer",200,false,"d", playerid);
format(Jstring, sizeof(Jstring),"\"%s\" has been automatically kicked | reason: 'Forbidden part nick (%s)'", GetName(playerid),BadNickParts[BadPartID]);
SendToAdmins(orange,Jstring);
WriteToLog(Jstring,"KickLog");
}
return 1;
}

i need help and here : https://sampforum.blast.hk/showthread.php?tid=555463
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)