Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for (i = 0; i < Object.keys(shop[key]).length; i++) {
- shop1 = shop[key][Object.keys(shop[key])[i]];
- for (a = 0; a < Object.keys(shop1).length; a++) {
- shop2 = shop1[Object.keys(shop1)[a]];
- for (b = 0; b < Object.keys(shop2).length; b++) {
- shop3 = shop2[Object.keys(shop2)[b]];
- if("price" in shop3) {
- mysqlc.mysqlc.query(`SELECT * FROM \`users\` WHERE \`socialclub\`= '${player.socialClub}'`, [], function(err, result) {
- if(err) {
- console.log('Error on connection ... ' + err);
- throw err;
- }
- else {
- unlocked_clothes = JSON.parse(result[0].unlocked_clothes);
- if(unlocked_clothes.includes(shop3.name)) {
- delete shop[key][Object.keys(shop[key])[global.i]][Object.keys(shop1)[global.a]][Object.keys(shop2)[global.b]]['price'];
- }
- }
- });
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement