Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(dialogid == DIALOG_UNLOCKACC)
- {
- if ( !response )
- return ( 1 ) ;
- new szPin;
- if ( sscanf( inputtext, "d", szPin ) )
- return ShowPlayerDialog( playerid, DIALOG_UNLOCKACC, DIALOG_STYLE_PASSWORD, "Unlock Account", "Te rugam introdu mai jos PIN-ul contului tau.", "Acces", "Anuleaza" ) ;
- if ( szPin != PlayerInfo[ playerid ][ SecurityCode ] )
- return SetTimerEx( "UnlockaccWait", 30000, false, "i", playerid ), SCM(playerid, COLOR_YELLOW, "Ai gresit codul PIN, te rugam asteapta 30 secunde.");
- SetPVarInt( playerid, "AccountLocked", 0 ) ;
- SendClientMessage( playerid, -1, "Contul tau a fost deblocat cu succes." ) ;
- return ( 1 ) ;
- }
- if(dialogid == DIALOG_SET_PIN)
- {
- if ( !response )
- return ( 1 ) ;
- new szPin, string[128];//,var[256];
- if ( sscanf( inputtext, "d", szPin ) )
- return ShowPlayerDialog( playerid, DIALOG_SET_PIN, DIALOG_STYLE_PASSWORD, "Lock Account", "Te rugam introdu mai jos un pin de 4 cifre.\n\n{FF0000}* Te rugam sa fii foarte atent si sa retii pin-ul.", "Seteaza", "Anuleaza" ) ;
- if ( szPin > 9999 || szPin < 1000 )
- return ShowPlayerDialog( playerid, DIALOG_SET_PIN, DIALOG_STYLE_PASSWORD, "Lock Account", "Te rugam introdu mai jos un pin de 4 cifre.\n\n{FF0000}* Pin-ul trebuie sa fie format din 4 cifre.", "Seteaza", "Anuleaza" ) ;
- SetPVarInt( playerid, "sz_Setting_Pin", szPin ) ;
- format(string, sizeof string, "Esti sigur ca vrei sa-ti setezi codul pin %d ?", GetPVarInt( playerid, "sz_Setting_Pin" ) ) ;
- ShowPlayerDialog( playerid, DIALOG_SET_PIN_1, DIALOG_STYLE_MSGBOX, "Lock Account", string, "Seteaza", "Anuleaza" ) ;
- return ( 1 ) ;
- }
- if(dialogid == DIALOG_SET_PIN_1)
- {
- new string[128];
- if ( !response )
- return ( 1 ) ;
- PlayerInfo[playerid][SecurityCode] = GetPVarInt( playerid, "sz_Setting_Pin" ) ;
- format( string, sizeof string, "UPDATE `users` SET `PIN` = %d WHERE `Name` = '%s'", GetPVarInt( playerid, "sz_Setting_Pin" ), GetName( playerid ) ) ;
- mysql_query(SQL, string);
- format( string, sizeof string, "Codul tau PIN este %d.", GetPVarInt( playerid, "sz_Setting_Pin" ) ) ;
- ShowPlayerDialog(playerid, -1, DIALOG_STYLE_MSGBOX, "Lock Account", string, "Anuleaza", "" ) ;
- SetPVarInt( playerid, "AccountLocked", 1 ) ;
- DeletePVar( playerid, "sz_setting_Pin" ) ;
- Update(playerid, pSecurityCodex);
- return ( 1 ) ;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement