#5

Quote:
Originally Posted by Loinal
Посмотреть сообщение
I have a command to set the password of an offline player that help me in that but its not working it doesn't set the player password correctly

PHP код:
CMD:setpassword(playeridparams[])
{
    if(
pData[playerid][Admin] >= 7)
    {
        new 
query[320], name[24], newpass[34], hash1[34];
        if(
sscanf(params"s[24]s[34]"namenewpass)) return SendClientMessage(playeridCOLOR_YELLOW"USAGE: /setpassword <PlayerName> <NewPassword>");
        if(!
AccountExists(name)) return SendClientMessage(playeridred"Account does not exists");
        
WP_Hash(hash1129newpass);
        
mysql_format(mysqlquerysizeof(query), "UPDATE `players` SET `Password` = '%e' WHERE `Username` = '%e'"hash1name);
        
mysql_tquery(mysqlquery);
        
format(querysizeof(query), "You have changed %s's password to %s"namenewpass);
        
SendClientMessage(playeridCOLOR_GREENquery);
        new 
IRC[130];
        
format(IRCsizeof(IRC), "1,8* Admin %s (ID: %d) changed %s's password to %s .",GetName(playerid), playeridnamenewpass);
        
IRC_GroupSay(groupID"&#ZoneX"IRC);
        
IRC_GroupSay(groupIDIRC_aCHANNELIRC);
        return 
1;
    }
    else return 
ShowMessage(playeridCOLOR_YELLOW17);

Why are you even broadcasting this to the IRC channel? This is definitely dangerous.
Reply


Messages In This Thread
Hash - by Loinal - 31.05.2017, 22:36
Re: Hash - by Sew_Sumi - 31.05.2017, 22:48
Re: Hash - by Loinal - 31.05.2017, 23:14
Re: Hash - by DaniceMcHarley - 31.05.2017, 23:23
Re: Hash - by Sew_Sumi - 31.05.2017, 23:29
Re: Hash - by NewFreeroamStunt - 31.05.2017, 23:31
Re: Hash - by Loinal - 31.05.2017, 23:32
Re: Hash - by GoldenLion - 01.06.2017, 05:29
Re: Hash - by Loinal - 01.06.2017, 09:47
Re: Hash - by GoldenLion - 01.06.2017, 13:32

Forum Jump:


Users browsing this thread: 1 Guest(s)