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
#2

How are we supposed to know what VIP and AdminLevel do?
Reply
#3

tahts not tah point man :< i want mah file creatin/registerin system to work :<
Reply
#4

Quote:
Originally Posted by hctiB_selffaW_yM
when i set etc. VIP=1, or AdminLevel=5, it doesnt affect
It doesn't affect what?

EDIT: Now I look more closely, it looks like you're using a pre-created admin script... Am I right?
Reply
#5

i fixd it :>
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)