Advertisement
DiazSRB

Untitled

Jan 13th, 2021
27
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.51 KB | None | 0 0
  1. forward CheckPlayerLastLogin( playerid );
  2. public CheckPlayerLastLogin( playerid ) {
  3.  
  4. new rows, fields;
  5. cache_get_data( rows, fields, _dbConnector );
  6.  
  7. if( !rows ) {
  8. SendErrorMessage( playerid, "Taj igrac ne postoji u bazi podataka!");
  9. }
  10. else {
  11. new last_login[ 64 ], orgsati = cache_get_field_content_int( 0, "org_contract" ), p_name[ MAX_PLAYER_NAME ], datetime[ 6 ], OrgID = PlayerInfo[ playerid ][ xLider ];
  12.  
  13. cache_get_field_content( 0, "p_name", p_name, _dbConnector, MAX_PLAYER_NAME );
  14. cache_get_field_content( 0, "last_login", last_login, _dbConnector, 64 );
  15.  
  16. for( new i = 0; i < org_info[ OrgID ][ oMaxClanova ]; i++ ) {
  17. if( strcmp( p_name, org_members_info[ OrgID ][ i ][ o_m_Name ], true ) == 0 ) {
  18. TimestampToDate( org_members_info[ OrgID ][ i ][ o_m_join_date ], datetime[ 0 ], datetime[ 1 ], datetime[ 2 ], datetime[ 3 ], datetime[ 4 ], datetime[ 5 ], 1 );
  19. break;
  20. }
  21. }
  22.  
  23. strdel( globalstring, 0, sizeof( globalstring ) );
  24.  
  25. 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 ] );
  26. strcat( globalstring, globalstring );
  27.  
  28. SPD( playerid, 0, DSMSG, "INFORMACIJE O CLANU", globalstring, "Ok", "" );
  29. strdel( globalstring, 0, sizeof( globalstring ) );
  30. }
  31. return (true);
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement