Password saves as 0.
#4

Close this, I've managed to fix it .. Just thought about it a bit, I changed the dialog to a command-working registration and managed to fix the saving. If you guys wonder how, here it is for those who are facing the problem just like me

I declared playerpassword[128]; as "new" on the top of my script, then I scripted the following -
pawn Код:
CMD:register(playerid, params[])
{
    if(sscanf(params,"s[128]",playerpassword)) return SendClientMessage(playerid, COLOR_ORANGE,"[REGISTRATION]/register <password>");
   
    new INI:File = INI_Open(UserPath(playerid));
    INI_SetTag(File,"data");
    INI_WriteString(File,"Password", playerpassword);
    INI_WriteInt(File,"Cash",0);
    INI_WriteInt(File,"Admin",-1);
    INI_WriteInt(File,"Kills",0);
    INI_WriteInt(File,"Deaths",0);
    INI_WriteInt(File,"Zombie",0);
    INI_WriteInt(File,"Score",1);
    INI_WriteInt(File,"Team",-1);
    INI_Close(File);

    PlayerInfo[playerid][pTeam] = -1;
    PlayerInfo[playerid][pAdmin] = -1;
   
    SavePlayerStats(playerid);
    return 1;
}
Reply


Messages In This Thread
Password saves as 0. - by Guitar - 29.08.2012, 16:46
Re: Password saves as 0. - by ThePrograme - 29.08.2012, 16:54
Re: Password saves as 0. - by Guitar - 29.08.2012, 16:55
Re: Password saves as 0. - by Guitar - 29.08.2012, 18:40

Forum Jump:


Users browsing this thread: 3 Guest(s)