MuhammadZeeshan

!alias cmd

Dec 13th, 2016
34
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. else if ( cmd == "!alias" )
  2. {
  3. if ( level < 3 ) 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 q = QuerySQL( db, "SELECT * FROM Alias WHERE Name='" + text + "'" );
  8. if ( GetSQLColumnData( q, 0 ) )
  9. {
  10. EchoMessage1( ICOL_PURPLE+"UID alias of " + text );
  11. local a;
  12. while ( GetSQLColumnData( q, 0 ) )
  13. {
  14. if ( a ) a = a + ", " + GetSQLColumnData(q,0);
  15. else a = GetSQLColumnData(q,0);
  16. GetSQLNextRow( q );
  17. }
  18. if ( a ) EchoMessage1( ICOL_PURPLE + "Aliasess [ " + a + " ]");
  19. }
  20. else EchoNotice1( user, "Error - " + text + " is not having any alias." );
  21. FreeSQLQuery(q);
  22. }
  23. }
Add Comment
Please, Sign In to add comment