18.02.2009, 03:43
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:
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; }