pass change
#1

hello, I have a problem with this code

it is not working

pawn Код:
COMMAND:changepass(playerid, params[])
{
    new file[128], pName[MAX_PLAYER_NAME];
    format(file, sizeof(file), SERVER_USER_FILE, pName);
    if(sscanf(params, "ss", params, params)) return SendClientMessage(playerid, Yellow, "Usage: /changepass <old password> <new password>");
    if(udb_hash(params) != dini_Int(file, "Password")) return SendClientMessage(playerid,Red,"Incorrect password !");
    else
    {
        GetPlayerName(playerid,pName,sizeof(pName));
        dini_IntSet(file, "Password", udb_hash(params));
        SendClientMessage(playerid,Green,"You succesfully changed your password !");
    }
    return 1;
}
Also this, it doesnt work

pawn Код:
COMMAND:getid(playerid, params[]) // credit to Lethal
{
    if(sscanf(params, "s[128]", params[2])) return SendClientMessage(playerid, Yellow, "Usage: /getid <name>");
    new found, string[128], playername[MAX_PLAYER_NAME];
    format(string,sizeof(string),"Searched for: \"%s\" ",params);
    SendClientMessage(playerid,blue,string);
    for(new i=0; i <= MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            GetPlayerName(i, playername, MAX_PLAYER_NAME);
            new namelen = strlen(playername);
            new bool:searched=false;
            for(new pos=0; pos <= namelen; pos++)
            {
                if(searched != true)
                {
                    if(strfind(playername,params,true) == pos)
                    {
                        found++;
                        format(string,sizeof(string),"%s (ID %d)",playername,i);
                        SendClientMessage(playerid, green ,string);
                        searched = true;
                    }
                }
            }
        }
    }
    if(found == 0) SendClientMessage(playerid, lightblue, "No players have this in their nick");
    return 1;
}
Reply


Messages In This Thread
pass change - by fissekarl - 07.04.2011, 13:37
Re: pass change - by [DJ]Boki - 07.04.2011, 13:38
Re: pass change - by fissekarl - 07.04.2011, 13:44
Re: pass change - by [DJ]Boki - 07.04.2011, 13:45
Re: pass change - by fissekarl - 07.04.2011, 13:47
Re: pass change - by fissekarl - 07.04.2011, 19:03
Re: pass change - by Vince - 07.04.2011, 19:47
Re: pass change - by xir - 07.04.2011, 20:05
Re: pass change - by fissekarl - 07.04.2011, 20:06

Forum Jump:


Users browsing this thread: 1 Guest(s)