MuhammadZeeshan

asdasfasffasfas

Dec 11th, 2016
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. function MacAddAlias(player)
  2. {
  3. local q = QuerySQL( db, "SELECT * FROM UIDAlias WHERE UID='" + player.UniqueID + "'" );
  4. if ( GetSQLColumnData( q,0 ) == player.UniqueID )
  5. {
  6. if ( GetSQLColumnData( q,1 ).find(player.Name) == null )
  7. {
  8. local Fk = GetSQLColumnData( q,1 )
  9. local mose = Fk + ", " + player.Name
  10. QuerySQL(db, "UPDATE UIDAlias SET Name='" + mose + "' WHERE UID= '" + player.UniqueID + "'");
  11. }
  12. }
  13. else
  14. {
  15. QuerySQL(db,"INSERT INTO UIDAlias VALUES('" + player.UniqueID + "', '" + player.Name + "')");
  16. }
  17. }
  18. QuerySQL(db, "CREATE TABLE IF NOT EXISTS UIDAlias ( UID VARCHAR(255), Name VARCHAR(25) ) ");
Add Comment
Please, Sign In to add comment