07.07.2010, 11:19
(
Последний раз редактировалось [SF]Bamdude37; 07.07.2010 в 12:19.
)
I have been working on an admin system and have hit a little... snag with dini. Here are a few issues I need help with.
Here is the player file.
This doesnt create an account
I know this funtion is being called because when I do this it does say
You have registered your account! You have also been logged in.
and allows me to spawn
Does anyone see anything wrong with it? because I dont :/
Here is the player file.
Код:
new playerfile[128], pname[MAX_PLAYER_NAME]; GetPlayerName(playerid, pname, sizeof(pname)); format(playerfile, sizeof(playerfile), "Users/%s.ini",pname);
Код:
if(dialogid == 201) { if(!strlen(inputtext)) return ShowPlayerDialog(playerid,201,DIALOG_STYLE_INPUT,"Registration","ERROR: You did not enter a password.\nPlease enter a password to register this account!","Register","Cancel"); new playerfile[128], pname[MAX_PLAYER_NAME]; GetPlayerName(playerid, pname, sizeof(pname)); format(playerfile, sizeof(playerfile), "Users/%s.ini",pname); if(dini_Exists(playerfile)) return SendClientMessage(playerid, red, "You are already registered!"); dini_Create(playerfile); new playerip[20]; GetPlayerIp(playerid, playerip, sizeof(playerip)); dini_IntSet(playerfile, "Password", udb_hash(inputtext)); dini_Set(playerfile, "Ip", playerip); dini_IntSet(playerfile, "Level", 0); dini_IntSet(playerfile, "Cash", 0); dini_IntSet(playerfile, "Score", 0); logged[playerid] = 1; SendClientMessage(playerid, yellow, "You have registered your account! You have also been logged in."); }
I know this funtion is being called because when I do this it does say
You have registered your account! You have also been logged in.
and allows me to spawn
Does anyone see anything wrong with it? because I dont :/