MuhammadZeeshan

as sdf asdg sdfg adfsgh

Dec 21st, 2016
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.57 KB | None | 0 0
  1. else if ( cmd == "!playerstats")
  2. {
  3. if ( level < 2 ) EchoNotice1( user, ICOL_RED + "Error - Your level is not high enough to use that command." );
  4. else if ( !text ) EchoNotice1( user, ICOL_RED + " Error - Syntax: " + cmd + " <player name>" );
  5. else
  6. {
  7. local query = QuerySQL( db, "SELECT * FROM Accounts WHERE Name ='" + text + "'" );
  8. if ( GetSQLColumnData( query, 0 ) )
  9. {
  10. local q = QuerySQL( db, "SELECT * FROM lastjoin WHERE Name='" + text + "' COLLATE NOCASE" );
  11. local last_join_time = time() - GetSQLColumnData( q, 1 ).tointeger();
  12.  
  13. local q_ = QuerySQL( db, "SELECT * FROM Alias WHERE Name ='" + text + "'" ), ip = "0.0.0.0";
  14. if ( GetSQLColumnData( q_, 0 ) )
  15. {
  16. ip = GetSQLColumnData(q_, 1 );
  17. }
  18. FreeSQLQuery( q_ );
  19. EchoNotice1( user, ICOL_PURPLE + " Name:[ " + text + " ], IP:[ " + ip + " ] Country:[ " + geoip_country_name_by_addr( ip ) + " ], Kills:[ " + GetSQLColumnData( query, 4 ) + " ] Deaths:[ " + GetSQLColumnData( query, 5 ) + " ], Cash:[ $" + GetSQLColumnData( query, 6 ) + " ], Bank:[ $" + GetSQLColumnData( query, 7 ) + " ], Joins:[ " + GetSQLColumnData( query, 8 ) + " ] Registered Date:[ " + GetSQLColumnData( query, 9 ) + " ], VIPLevel:[ " + GetSQLColumnData( query, 12 ) + " ], UID:[ " + GetSQLColumnData( query, 13 ) + " ] Lastactive:[ "+GetTimeFormat( last_join_time )+" ], Total Playtime:[ " + Duration( GetSQLColumnData( query, 15 ) ) + "]");
  20. FreeSQLQuery( q );
  21. }
  22. else EchoNotice1( user, ICOL_RED + " Error - " + text + " is not registered." );
  23. FreeSQLQuery( query );
  24. }
  25. }
Add Comment
Please, Sign In to add comment