registration, and system bug
#1

when i register on my server with my admin script, it creates a file "(The player name here).dudb.sav", and i changed the files denstantion and name to thing, and when i set etc. VIP=1, or AdminLevel=5, it doesnt affect

i got this:

Код:
dcmd_register(playerid,params[])
{
  if (PlayerData[playerid][LoggedIn] == 1)
	return SendClientMessage(playerid,COLOR_RED,"[ERROR]: You are already logged in.");
  if (udb_Exists(PlayerName(playerid)))
	return SendClientMessage(playerid,COLOR_RED,"[ERROR]: This account already exists, please use /login [PASSWORD].");
  if (strlen(params) == 0)
	return SendClientMessage(playerid,COLOR_RED,"[USAGE]: /register [PASSWORD]");
  if (strlen(params) < 4 || strlen(params) > 20)
	return SendClientMessage(playerid,COLOR_RED,"[ERROR]: Password length must be longer than 3 characters.");
  if (udb_Create(PlayerName(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),"/WafflesAdmin/Users/%s.sav",udb_encode(name));
  	GetPlayerIp(playerid,tmp3,100);	dini_Set(file,"ip",tmp3);
 		format(strdate, sizeof(strdate), "%d/%d/%d",day,month,year);
		dUserSetINT(PlayerName(playerid)).("Registered",1);
		dUserSetINT(PlayerName(playerid)).("VIP",0);
		dUserSetINT(PlayerName(playerid)).("AdminLevel",0);
    PlayerData[playerid][LoggedIn] = 1;
	  PlayerData[playerid][Registered] = 1;
	  SendClientMessage(playerid, COLOR_LIGHTBLUE, "You have now registered, and have been automatically been logged in.");
		return 1;
	}
  return true;
}
Reply


Messages In This Thread
registration, and system bug - by My_Waffles_Bitch_L0L - 18.02.2009, 03:43
Re: registration, and system bug - by 1337pr0 - 18.02.2009, 07:26
Re: registration, and system bug - by My_Waffles_Bitch_L0L - 18.02.2009, 07:46
Re: registration, and system bug - by 1337pr0 - 18.02.2009, 18:42
Re: registration, and system bug - by My_Waffles_Bitch_L0L - 18.02.2009, 19:10

Forum Jump:


Users browsing this thread: 1 Guest(s)