SA-MP Forums Archive
Help needed. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Server (https://sampforum.blast.hk/forumdisplay.php?fid=6)
+--- Forum: Server Support (https://sampforum.blast.hk/forumdisplay.php?fid=19)
+--- Thread: Help needed. (/showthread.php?tid=385926)



Help needed. - Laure - 18.10.2012

Hello, i got a bug in my account, however i input any password which i didnt register with i can log into my account..
And then when i open users in scriptfiles and open my accounts info there no nothing written in the Key: section.But before there was a code.


Re: Help needed. - Simplyfrag - 18.10.2012

did you have something like this

Quote:

public OnPlayerRegister(playerid, password[])
{
if(IsPlayerConnected(playerid))
{
new string3[32];
new playername3[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername3, sizeof(playername3));
format(string3, sizeof(string3), "users/%s.ini", playername3);
new File: hFile = fopen(string3, io_write);
if (hFile)
{




Re: Help needed. - Laure - 18.10.2012

Yes exactly the same here is it
Код:
	public OnPlayerRegister(playerid, password[])
{
	if(IsPlayerConnected(playerid))
	{
			new string3[32];
			new playername3[MAX_PLAYER_NAME];
			GetPlayerName(playerid, playername3, sizeof(playername3));
			format(string3, sizeof(string3), "users/%s.ini", playername3);
			new File: hFile = fopen(string3, io_write);
			if (hFile)
			{



Re: Help needed. - Simplyfrag - 18.10.2012

try using mine reply back if not working


Re: Help needed. - Laure - 18.10.2012

I Didnt understand arent our codes same?


Re: Help needed. - Simplyfrag - 18.10.2012

yes but give it a try also do you having somthing like this in the script aswell
Quote:

if( strcmp( key , "Key" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[MAX_PLAYERS][pKey], val, 0, strlen(val)-1, 255); }
if( strcmp( key , "Level" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[MAX_PLAYERS][pLevel] = strval( val ); }
if( strcmp( key , "AdminLevel" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[MAX_PLAYERS][pAdmin] = strval( val ); }




Re: Help needed. - Laure - 18.10.2012

Hmm have others but not the first one written key
Код:
if( strcmp( key , "Level" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLevel] = strval( val ); }
					if( strcmp( key , "AdminLevel" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAdmin] = strval( val ); }
					if( strcmp( key , "Band" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pBanned] = strval( val ); }



Re: Help needed. - Simplyfrag - 18.10.2012

#define LOADUSERDATA_THREAD 1 add this to top of your script


Re: Help needed. - Laure - 18.10.2012

Oh sorry i have the same line as yours too
Код:
if( strcmp( key , "Key" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[MAX_PLAYERS][pKey], val, 0, strlen(val)-1, 255); }
					if( strcmp( key , "Level" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[MAX_PLAYERS][pLevel] = strval( val );  }
					if( strcmp( key , "AdminLevel" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[MAX_PLAYERS][pAdmin] = strval( val ); }
					if( strcmp( key , "Band" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[MAX_PLAYERS][pBanned] = strval( val ); }
					if( strcmp( key , "PermBand" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[MAX_PLAYERS][pPermaBanned] = strval( val ); }



Re: Help needed. - Laure - 18.10.2012

Nope still not working sir