- 0
/Setpassword offline
-
Similar Content
-
- 5 replies
- 414 views
-
-
Recently Browsing 0 members
- No registered users viewing this page.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.
Question
Sle|D
Nick: Sle|d
Problema: am sters cand nu este conecta palyerul dar nu pot i-mi zice ca sa salvat la contul "S" parola care pun..comanda era pentru player id si sa fie online
Erori / warnings: nu da
Lini/script: mai jos
Ai incercat sa rezolvi singur ?:Da dar nu pre i-mi dau seama:-?
CMD:setpassword( playerid, params[ ] )
{
LevelCheck( playerid, 6 );
new Player, NewPass[ 25 ];
if ( sscanf( params, "us[25]", Player, NewPass ) )
return SendClientMessage( playerid, COLOR_BLUE, "Foloseste: {33CCFF}/setpassword [Numele jucatorului] [Parola noua]" );
if ( strlen( NewPass ) < 6 || strlen( NewPass ) > 24 )
return SendError( playerid, "Lungimea parolei invalida!" );
if ( !IsPlayerConnected( Player ) )
return SendError( playerid, "Playerul nu este conectat!" );
mysql_real_escape_string( NewPass, NewPass );
new Buf[ 129 ];
WP_Hash( Buf, 129, NewPass );
format( gsQuery, 512, "UPDATE `Accounts` SET `Password` = '%s' WHERE `Name` = '%s'", Buf, PlayerName( Player ) );
mysql_function_query( g_Handle, gsQuery, false, "", "" );
FormatLog( "Set_PasswordLog", "%s have set the %s password to %s (Hash: %s)", PlayerName( playerid ), PlayerName( Player ), NewPass, Buf );
PlayerPlaySound( playerid, 1057, 0.0, 0.0, 0.0 );
FormatMSG( playerid, COLOR_RED, "ACCOUNT: Ai reusit cu succes sa setezi {FFFFFF}\"%s's\" {FF0000}ca parola la contul {FFFFFF}\"%s\"", PlayerName( Player ), NewPass );
return ( 1 );
}
Link to comment
Share on other sites
10 answers to this question
Recommended Posts