lil' help here
#4

I believe that your password should be a string, and therefore should be retrieved using the dini_Get function rather than the dini_Int function, which also means your "temp" should be an array in order to store all of the characters.

For example:
pawn Код:
dcmd_login(playerid,params[])
{
    new file[128],pName[MAX_PLAYER_NAME];
    GetPlayerName(playerid,pName,sizeof(pName));
    format(file,sizeof(file),"dregister/users/%s",pName);
    if(!dini_Exists(file)) return SendClientMessage(playerid,red,"ERROR:You arnt registered");
    new temp[128];
    temp = dini_Get(file,"Password");
    if(!strcmp(params,temp))
    {
        SendClientMessage(playerid,yellow,"Welcome %s, you have been logged in");
        PInfo[playerid][Logged] = 1;
        PInfo[playerid][Score] = dini_Int(file,"Score");
        PInfo[playerid][Cash] = dini_Int(file,"Cash");
    }
    return 1;
}
Reply


Messages In This Thread
lil' help here - by dark_clown - 16.11.2010, 16:45
Re: lil' help here - by Joe Staff - 16.11.2010, 16:49
Re: lil' help here - by dark_clown - 16.11.2010, 16:52
Re: lil' help here - by JaTochNietDan - 16.11.2010, 16:56
Re: lil' help here - by dark_clown - 16.11.2010, 16:59

Forum Jump:


Users browsing this thread: 1 Guest(s)