08.12.2013, 12:45
hi,
there's some problem in dini, when the player registers , the password saves as numbers... :/ before some days i was seeing some register tutorials and some of them had the correct way to save password, i have forget which one :/
i will show you register cmd code:
Thanks. ..
there's some problem in dini, when the player registers , the password saves as numbers... :/ before some days i was seeing some register tutorials and some of them had the correct way to save password, i have forget which one :/
i will show you register cmd code:
pawn Код:
CMD:register(playerid, params[])
{
new file[128] , pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof(pname));
format(file, sizeof(file), "Users/%s.ini", pname);
if(sscanf(params, "s", "Password")) return SendClientMessage(playerid, RED, "Use /register password");
if(!fexist(file))
{
dini_Create(file);
dini_Set(file, "Password", params);
dini_IntSet(file, "Level", 0);
dini_IntSet(file, "Score", GetPlayerScore(playerid));
dini_IntSet(file, "Money", GetPlayerMoney(playerid));
dini_IntSet(file, "Deaths", PlayerInfo[playerid][Deaths]);
dini_IntSet(file, "Kills", PlayerInfo[playerid][Kills]);
new string[128];
format(string, sizeof(string), "[SYSTEM] You have been sucessfully registered! You password is: {FF1E00}%s", params);
SendClientMessage(playerid, GREEN, string);
PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
PlayerInfo[playerid][logged] = 1;
}
else
{
SendClientMessage(playerid, RED, "You are already registered.");
}
return 1;
}