SA-MP Forums Archive
User accounts don't save. - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: User accounts don't save. (/showthread.php?tid=135569)



User accounts don't save. - Wasim_Cortez - 21.03.2010

Ok, I own a RP Server and lately i have got a bug out of the blues, I don't remember editing the script that would make this bug happen, Well this is what happens, A user makes a new account and the Account does not save, Is there any code i can put in it to make it save them?


Re: User accounts don't save. - Correlli - 21.03.2010

More information? Like what kind of registration system do you use? dINI/dUDB, ..?


Re: User accounts don't save. - Wasim_Cortez - 21.03.2010

Quote:
Originally Posted by Don Correlli
More information? Like what kind of registration system do you use? dINI/dUDB, ..?
Well the one from LA-RP, It's like a major LA-RP edit.. Not sure what System it uses.


Re: User accounts don't save. - Fabio11 - 21.03.2010

Show us you /register command please. Maybe the problem is there.


Re: User accounts don't save. - Wasim_Cortez - 21.03.2010

Quote:
Originally Posted by Fabio11
Show us you /register command please. Maybe the problem is there.
Hmmm, I can't seem to open the GM atm, When ever i got File>Open.. Pawno just freezes...


Re: User accounts don't save. - YoungMoolaBaby.2010 - 21.03.2010

no for example u have to do it in a folder like this
Код:
GetPlayerName(playerid, sendername, sizeof(sendername));
			format(string, sizeof(string), "FOLDER NAME HERE MUST BE HERE AND FOLDER HAVE TO BE IN SCRIPTFILES/%s.ini", sendername);
			new File: hFile = fopen(string, io_read);
			if (hFile)
			{
				SendClientMessage(playerid, COLOR_YELLOW, "That Username is already taken, please choose a different one.");
				fclose(hFile);
				return 1;
			}



Re: User accounts don't save. - Wasim_Cortez - 21.03.2010

Quote:
Originally Posted by YoungMoolaBaby.2010
no for example u have to do it in a folder like this
Код:
GetPlayerName(playerid, sendername, sizeof(sendername));
			format(string, sizeof(string), "FOLDER NAME HERE MUST BE HERE AND FOLDER HAVE TO BE IN SCRIPTFILES/%s.ini", sendername);
			new File: hFile = fopen(string, io_read);
			if (hFile)
			{
				SendClientMessage(playerid, COLOR_YELLOW, "That Username is already taken, please choose a different one.");
				fclose(hFile);
				return 1;
			}
Sooo Do you think thats whats missing?


Re: User accounts don't save. - YoungMoolaBaby.2010 - 21.03.2010

post ur login system ill fix it...


Re: User accounts don't save. - Wasim_Cortez - 21.03.2010

Quote:
Originally Posted by YoungMoolaBaby.2010
post ur login system ill fix it...
'iight let me get it
EDIT: You mean this?
Код:
public OnPlayerRequestClass(playerid, classid)
{
	PlayerPlaySound(playerid, 1068, 0.0, 0.0, 0.0);
	PlayerInfo[playerid][pModel] = Peds[classid][0];

	if (RegistrationStep[playerid] == 0 && gPlayerLogged[playerid] != 1)
	{
		ClearChatbox(playerid, 10);
	  SendClientMessage(playerid, COLOR_YELLOW2, "____________________________________");
	  SendClientMessage(playerid, COLOR_YELLOW2, " ");
		SendClientMessage(playerid, COLOR_YELLOW, " Welcome back to Real life Roleplay");
		SendClientMessage(playerid, COLOR_YELLOW2, " ");
		SendClientMessage(playerid, COLOR_YELLOW2, "____________________________________");
		SendClientMessage(playerid, COLOR_WHITE, "HINT:Type your password in the box below to login.");
		if (gPlayerAccount[playerid] != 0)
		{
			new loginstring[128];
			new loginname[64];
			GetPlayerName(playerid,loginname,sizeof(loginname));
			format(loginstring,sizeof(loginstring),"Welcome %s\nLogin to get back into the game.\n[HINT]:Enter Password Below.",loginname);
			ShowPlayerDialog(playerid,12346,DIALOG_STYLE_INPUT,"Login",loginstring,"Login","Exit");
		}
		else
		{
			gPlayerAccount[playerid] = 0;
 			new regstring[128];
			new regname[64];
			GetPlayerName(playerid,regname,sizeof(regname));
			format(regstring,sizeof(regstring),"Welcome, %s\nI see you a new here?\nPlease register\n[HINT]:Enter a password you would use below.",regname);
			ShowPlayerDialog(playerid,12345,DIALOG_STYLE_INPUT,"Register",regstring,"Register","Exit");
		}
		PlayerPlaySound(playerid, 1185, 0.0, 0.0, 0.0);
		SetPlayerCameraPos(playerid, 1163.2378,-2037.3778,69.0078);
		SetPlayerCameraLookAt(playerid, 1121.9740,-2037.0681,77.3166);
		SetPlayerPos(0.0, 0.0, 0.0);
		PlayerInfo[playerid][pModel] = Peds[classid][0];
		SetPlayerTeamFromClass(playerid,classid);
	}
	else SpawnPlayer(playerid);
	return false;