Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- else if ( cmd == "!playerstats")
- {
- if ( level < 2 ) EchoNotice1( user, ICOL_RED + "Error - Your level is not high enough to use that command." );
- else if ( !text ) EchoNotice1( user, ICOL_RED + " Error - Syntax: " + cmd + " <player name>" );
- else
- {
- local query = QuerySQL( db, "SELECT * FROM Accounts WHERE Name ='" + text + "'" );
- if ( GetSQLColumnData( query, 0 ) )
- {
- local q = QuerySQL( db, "SELECT * FROM lastjoin WHERE Name='" + text + "' COLLATE NOCASE" );
- local last_join_time = time() - GetSQLColumnData( q, 1 ).tointeger();
- EchoNotice1( user, ICOL_PURPLE + " Name:[ " + text + " ], IP:[ " + GetSQLColumnData( query, 1 ) + " ] Country:[ " + geoip_country_name_by_addr( GetSQLColumnData( query, 1 ) ) + " ], Kills:[ " + GetSQLColumnData( query, 4 ) + " ] Deahts:[ " + 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 )+" ]");
- FreeSQLQuery( q );
- }
- else EchoNotice1( user, ICOL_RED + " Error - " + text + " is not registered." );
- FreeSQLQuery( query );
- }
- }
Add Comment
Please, Sign In to add comment