[Include] C-SMF - Connect from Simple Machines Forums to SA-MP!
#26

Quote:
Originally Posted by ded
Посмотреть сообщение
This was something for a quick test of it, I wonder if it has anything to do with the email. I know probably it should be formatted within the command as a parameter, this was just a quick check.

Код:
CMD:register(playerid,params[])
{
    if (PlayerInfo[playerid][LoggedIn] == 1) return SendClientMessage(playerid,red,"FIZ: You are already registered and logged in.");
    if (udb_Exists(PlayerName2(playerid))) return SendClientMessage(playerid,red,"FIZ: This account already exists, please use '/login [password]'.");
    if (strlen(params) == 0) return SendClientMessage(playerid,red,"FIZ: Correct usage: '/register [password]'");
    if (strlen(params) < 5 || strlen(params) > 20) return SendClientMessage(playerid,red,"ACCOUNT: Password length must be greater than four characters");
    if (udb_Create(PlayerName2(playerid),params))
	{
    	new file[256],name[MAX_PLAYER_NAME], tmp3[100];
    	new strdate[20], year,month,day;	getdate(year, month, day);
		GetPlayerName(playerid,name,sizeof(name)); format(file,sizeof(file),"/fizzio/users/%s.sav",udb_encode(name));
     	GetPlayerIp(playerid,tmp3,100);	dini_Set(file,"ip",tmp3);
//    	dini_Set(file,"password",params);
	    dUserSetINT(PlayerName2(playerid)).("registered",1);
   		format(strdate, sizeof(strdate), "%d/%d/%d",day,month,year);
		dini_Set(file,"RegisteredDate",strdate);
		dUserSetINT(PlayerName2(playerid)).("loggedin",1);
		dUserSetINT(PlayerName2(playerid)).("banned",0);
		dUserSetINT(PlayerName2(playerid)).("level",0);
		dUserSetINT(PlayerName2(playerid)).("Regular",0);
		dUserSetINT(PlayerName2(playerid)).("Developer",0);
		dUserSetINT(PlayerName2(playerid)).("Bank",0);
		dUserSetINT(PlayerName2(playerid)).("Cookies",1);
	    dUserSetINT(PlayerName2(playerid)).("LastOn",0);
    	dUserSetINT(PlayerName2(playerid)).("money",0);
    	dUserSetINT(PlayerName2(playerid)).("kills",0);
	   	dUserSetINT(PlayerName2(playerid)).("deaths",0);
	   	dUserSetINT(PlayerName2(playerid)).("hours",0);
	   	dUserSetINT(PlayerName2(playerid)).("minutes",0);
	   	dUserSetINT(PlayerName2(playerid)).("seconds",0);
        dUserSetINT(PlayerName2(playerid)).("SpawnColour",255);
	   	dUserSetINT(PlayerName2(playerid)).("xAccount",0);
		dUserSetINT(PlayerName2(playerid)).("CarKey",0);
		dUserSetINT(PlayerName2(playerid)).("Licence",0);
	    PlayerInfo[playerid][LoggedIn] = 1;
	    PlayerInfo[playerid][Registered] = 1;
	    SendClientMessage(playerid, MANAGEMENT, "FIZ: You are now registered, and have been automatically logged in");
		CreateAccount(name, params, "accounts.fiz@gmail.com");
		return 1;
	}
    return 1;
}
That's strange, just to double check if it's the function, add CreateAccount in OnGameModeInit or something, and add a random name and password for the parameters.
Reply


Messages In This Thread
C-SMF 1.1 - Connect from Simple Machines Forums to SA-MP! - by Carlton - 05.07.2010, 15:50
Re: C-SMF - Connect from Simple Machines Forums to SA-MP! - by sampfun - 05.07.2010, 16:21
Re: C-SMF - Connect from Simple Machines Forums to SA-MP! - by -Sneaky- - 05.07.2010, 16:21
Re: C-SMF - Connect from Simple Machines Forums to SA-MP! - by Typhome - 05.07.2010, 16:27
Re: C-SMF - Connect from Simple Machines Forums to SA-MP! - by Calgon - 05.07.2010, 16:27
Re: C-SMF - Connect from Simple Machines Forums to SA-MP! - by Carlton - 05.07.2010, 16:28
Re: C-SMF - Connect from Simple Machines Forums to SA-MP! - by ziomal432 - 05.07.2010, 16:49
Re: C-SMF - Connect from Simple Machines Forums to SA-MP! - by Carlton - 05.07.2010, 16:52
Re: C-SMF - Connect from Simple Machines Forums to SA-MP! - by L4ky - 05.07.2010, 17:06
Re: C-SMF - Connect from Simple Machines Forums to SA-MP! - by Carlton - 05.07.2010, 20:13
Re: C-SMF - Connect from Simple Machines Forums to SA-MP! - by shady91 - 06.07.2010, 01:18
Re: C-SMF - Connect from Simple Machines Forums to SA-MP! - by iZN - 06.07.2010, 05:47
Re: C-SMF - Connect from Simple Machines Forums to SA-MP! - by [03]Garsino - 06.07.2010, 10:28
Re: C-SMF - Connect from Simple Machines Forums to SA-MP! - by Jay_ - 06.07.2010, 12:57
Re: C-SMF - Connect from Simple Machines Forums to SA-MP! - by Calgon - 06.07.2010, 14:01
Re: C-SMF - Connect from Simple Machines Forums to SA-MP! - by Carlton - 06.07.2010, 15:37
Re: C-SMF - Connect from Simple Machines Forums to SA-MP! - by Burridge - 06.07.2010, 22:52
Re: C-SMF - Connect from Simple Machines Forums to SA-MP! - by TheKingOfSamp - 06.07.2010, 22:54
Re: C-SMF - Connect from Simple Machines Forums to SA-MP! - by BloodyEric - 07.07.2010, 08:43
Re: C-SMF - Connect from Simple Machines Forums to SA-MP! - by Calgon - 07.07.2010, 10:41
Re: C-SMF - Connect from Simple Machines Forums to SA-MP! - by Simon - 07.07.2010, 11:56
Re: C-SMF - Connect from Simple Machines Forums to SA-MP! - by KnooL - 07.07.2010, 12:16
Re: C-SMF - Connect from Simple Machines Forums to SA-MP! - by Carlton - 07.07.2010, 12:39
Re: C-SMF - Connect from Simple Machines Forums to SA-MP! - by Carlton - 07.07.2010, 13:16
Re: C-SMF - Connect from Simple Machines Forums to SA-MP! - by Carlton - 07.07.2010, 23:43
Re: C-SMF - Connect from Simple Machines Forums to SA-MP! - by Carlton - 08.07.2010, 00:03
Re: C-SMF - Connect from Simple Machines Forums to SA-MP! - by wr4h4ck - 08.07.2010, 17:00
Re: C-SMF - Connect from Simple Machines Forums to SA-MP! - by Carlton - 08.07.2010, 23:18
Re: C-SMF - Connect from Simple Machines Forums to SA-MP! - by Carlton - 13.07.2010, 18:23
Re: C-SMF - Connect from Simple Machines Forums to SA-MP! - by Scones - 15.07.2010, 16:27
Re: C-SMF - Connect from Simple Machines Forums to SA-MP! - by Jay_ - 07.08.2010, 12:08
Re: C-SMF - Connect from Simple Machines Forums to SA-MP! - by Jay_ - 07.08.2010, 14:08
Re: C-SMF - Connect from Simple Machines Forums to SA-MP! - by Carlton - 07.08.2010, 17:19
Re: C-SMF - Connect from Simple Machines Forums to SA-MP! - by Jay_ - 07.08.2010, 17:37
Re: C-SMF - Connect from Simple Machines Forums to SA-MP! - by Jay_ - 08.08.2010, 13:50
Re: C-SMF - Connect from Simple Machines Forums to SA-MP! - by armyoftwo - 10.08.2010, 16:29
Re: C-SMF - Connect from Simple Machines Forums to SA-MP! - by rbN. - 27.11.2010, 14:44
Re: C-SMF - Connect from Simple Machines Forums to SA-MP! - by gtg2808 - 22.12.2010, 16:24
Re: C-SMF - Connect from Simple Machines Forums to SA-MP! - by iTorran - 01.01.2011, 13:41
Re: C-SMF - Connect from Simple Machines Forums to SA-MP! - by Luis- - 02.10.2011, 13:30
Re: C-SMF - Connect from Simple Machines Forums to SA-MP! - by Edvin - 02.10.2011, 17:55
Re: C-SMF - Connect from Simple Machines Forums to SA-MP! - by Kazuo - 03.10.2011, 07:11
Re: C-SMF - Connect from Simple Machines Forums to SA-MP! - by Dripac - 03.10.2011, 07:12
Re : C-SMF - Connect from Simple Machines Forums to SA-MP! - by Varkoll_ - 03.10.2011, 18:05
Re : C-SMF - Connect from Simple Machines Forums to SA-MP! - by TheBest6 - 03.10.2011, 18:15
Re: C-SMF - Connect from Simple Machines Forums to SA-MP! - by TheLazySloth - 03.10.2011, 18:27
Re: C-SMF - Connect from Simple Machines Forums to SA-MP! - by LZLo - 03.10.2011, 18:37
Re: C-SMF - Connect from Simple Machines Forums to SA-MP! - by Luis- - 03.10.2011, 21:24
Re : C-SMF - Connect from Simple Machines Forums to SA-MP! - by deliocomrp - 08.10.2011, 19:51
Re: C-SMF - Connect from Simple Machines Forums to SA-MP! - by GangsTa_ - 08.10.2011, 20:58
Re: C-SMF - Connect from Simple Machines Forums to SA-MP! - by Ronaldo_raul™ - 20.12.2011, 19:34
Re: C-SMF - Connect from Simple Machines Forums to SA-MP! - by Astralis - 20.12.2011, 19:40
Re: C-SMF - Connect from Simple Machines Forums to SA-MP! - by AndreT - 20.12.2011, 19:47
Re: C-SMF - Connect from Simple Machines Forums to SA-MP! - by Raku - 08.03.2012, 01:12
Re: C-SMF - Connect from Simple Machines Forums to SA-MP! - by Britas - 17.03.2012, 15:07

Forum Jump:


Users browsing this thread: 4 Guest(s)