Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- forward CheckPlayerLastLogin( playerid );
- public CheckPlayerLastLogin( playerid ) {
- new rows, fields;
- cache_get_data( rows, fields, _dbConnector );
- if( !rows ) {
- SendErrorMessage( playerid, "Taj igrac ne postoji u bazi podataka!");
- }
- else {
- new last_login[ 64 ], orgsati = cache_get_field_content_int( 0, "org_contract" ), p_name[ MAX_PLAYER_NAME ], datetime[ 6 ], OrgID = PlayerInfo[ playerid ][ xLider ];
- cache_get_field_content( 0, "p_name", p_name, _dbConnector, MAX_PLAYER_NAME );
- cache_get_field_content( 0, "last_login", last_login, _dbConnector, 64 );
- for( new i = 0; i < org_info[ OrgID ][ oMaxClanova ]; i++ ) {
- if( strcmp( p_name, org_members_info[ OrgID ][ i ][ o_m_Name ], true ) == 0 ) {
- TimestampToDate( org_members_info[ OrgID ][ i ][ o_m_join_date ], datetime[ 0 ], datetime[ 1 ], datetime[ 2 ], datetime[ 3 ], datetime[ 4 ], datetime[ 5 ], 1 );
- break;
- }
- }
- strdel( globalstring, 0, sizeof( globalstring ) );
- format( globalstring, sizeof( globalstring ), ""col_white"%s\n"col_server"LL: "col_white"%s\n"col_server"Sati u org: "col_white"%dh\n"col_server"Usao u org: "col_white"%02d:%02d:%02d", p_name, last_login, orgsati, datetime[ 2 ], datetime[ 1 ], datetime[ 0 ], datetime[ 3 ], datetime[ 4 ], datetime[ 5 ] );
- strcat( globalstring, globalstring );
- SPD( playerid, 0, DSMSG, "INFORMACIJE O CLANU", globalstring, "Ok", "" );
- strdel( globalstring, 0, sizeof( globalstring ) );
- }
- return (true);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement