Jump to content

Shortcuts (Animations) on Numpad 1.0.0 Javascirpt 1.1.0

   (0 reviews)

1 Screenshot

About This File

Animationswechsler.gif

About this File

  • I used this res to create my res: Shortcuts (Animations) on Numpad 1.0.0
  • Before first Startup: you import db.sql in your Database and change "Yourname" in the record or leave it.
  • I used RPC in this example, install it. My node_modules are in the archive located.

Do this on Login/Startup Serverside

gm.mysql.handle.query("SELECT * FROM shortcuts WHERE name = ?", [player.name], function (err10,res10) {
        if (err10) console.log("Error in loadShortcuts: "+err10);

        if (res10.length > 0) {
            res10.forEach(function (shortcutData) { 
                player.data.numpad1A = shortcutData.num1animA;
                player.data.numpad1B = shortcutData.num1animB;
                player.data.numpad1C = shortcutData.num1animC;
                player.data.numpad1D = shortcutData.num1animD;
                player.data.numpad1Name = shortcutData.num1name;
                player.data.numpad2A = shortcutData.num2animA;
                player.data.numpad2B = shortcutData.num2animB;
                player.data.numpad2C = shortcutData.num2animC;
                player.data.numpad2D = shortcutData.num2animD;
                player.data.numpad2Name = shortcutData.num2name;  
                player.data.numpad3A = shortcutData.num3animA;
                player.data.numpad3B = shortcutData.num3animB;
                player.data.numpad3C = shortcutData.num3animC;
                player.data.numpad3D = shortcutData.num3animD;
                player.data.numpad3Name = shortcutData.num3name;  
                player.data.numpad4A = shortcutData.num4animA;
                player.data.numpad4B = shortcutData.num4animB;
                player.data.numpad4C = shortcutData.num4animC;
                player.data.numpad4D = shortcutData.num4animD;
                player.data.numpad4Name = shortcutData.num4name;  
                player.data.numpad5A = shortcutData.num5animA;
                player.data.numpad5B = shortcutData.num5animB;
                player.data.numpad5C = shortcutData.num5animC;
                player.data.numpad5D = shortcutData.num5animD;
                player.data.numpad5Name = shortcutData.num5name;  
                player.data.numpad6A = shortcutData.num6animA;
                player.data.numpad6B = shortcutData.num6animB;
                player.data.numpad6C = shortcutData.num6animC;
                player.data.numpad6D = shortcutData.num6animD;
                player.data.numpad6Name = shortcutData.num6name;  
                player.data.numpad7A = shortcutData.num7animA;
                player.data.numpad7B = shortcutData.num7animB;
                player.data.numpad7C = shortcutData.num7animC;
                player.data.numpad7D = shortcutData.num7animD;
                player.data.numpad7Name = shortcutData.num7name;  
                player.data.numpad8A = shortcutData.num8animA;
                player.data.numpad8B = shortcutData.num8animB;
                player.data.numpad8C = shortcutData.num8animC;
                player.data.numpad8D = shortcutData.num8animD;
                player.data.numpad8Name = shortcutData.num8name;  
                player.data.numpad9A = shortcutData.num9animA;
                player.data.numpad9B = shortcutData.num9animB;
                player.data.numpad9C = shortcutData.num9animC;
                player.data.numpad9D = shortcutData.num9animD;
                player.data.numpad9Name = shortcutData.num9name;      
            });
        }else{
            gm.mysql.handle.query("INSERT INTO shortcuts SET name = ?", [player.name], function (insertError) {
                if (insertError) console.log(`[Shortcuts Init Error] ${err.message}`);
                if(!insertError){
                    gm.mysql.handle.query("SELECT * FROM shortcuts WHERE name = ?", [player.name], function (err10,res10) {
                        if (err10) console.log("Error in loadShortcuts: "+err10);
                
                        if (res10.length > 0) {
                            res10.forEach(function (shortcutData) { 
                                player.data.numpad1A = shortcutData.num1animA;
                                player.data.numpad1B = shortcutData.num1animB;
                                player.data.numpad1C = shortcutData.num1animC;
                                player.data.numpad1D = shortcutData.num1animD;
                                player.data.numpad1Name = shortcutData.num1name;
                                player.data.numpad2A = shortcutData.num2animA;
                                player.data.numpad2B = shortcutData.num2animB;
                                player.data.numpad2C = shortcutData.num2animC;
                                player.data.numpad2D = shortcutData.num2animD;
                                player.data.numpad2Name = shortcutData.num2name;  
                                player.data.numpad3A = shortcutData.num3animA;
                                player.data.numpad3B = shortcutData.num3animB;
                                player.data.numpad3C = shortcutData.num3animC;
                                player.data.numpad3D = shortcutData.num3animD;
                                player.data.numpad3Name = shortcutData.num3name;  
                                player.data.numpad4A = shortcutData.num4animA;
                                player.data.numpad4B = shortcutData.num4animB;
                                player.data.numpad4C = shortcutData.num4animC;
                                player.data.numpad4D = shortcutData.num4animD;
                                player.data.numpad4Name = shortcutData.num4name;  
                                player.data.numpad5A = shortcutData.num5animA;
                                player.data.numpad5B = shortcutData.num5animB;
                                player.data.numpad5C = shortcutData.num5animC;
                                player.data.numpad5D = shortcutData.num5animD;
                                player.data.numpad5Name = shortcutData.num5name;  
                                player.data.numpad6A = shortcutData.num6animA;
                                player.data.numpad6B = shortcutData.num6animB;
                                player.data.numpad6C = shortcutData.num6animC;
                                player.data.numpad6D = shortcutData.num6animD;
                                player.data.numpad6Name = shortcutData.num6name;  
                                player.data.numpad7A = shortcutData.num7animA;
                                player.data.numpad7B = shortcutData.num7animB;
                                player.data.numpad7C = shortcutData.num7animC;
                                player.data.numpad7D = shortcutData.num7animD;
                                player.data.numpad7Name = shortcutData.num7name;  
                                player.data.numpad8A = shortcutData.num8animA;
                                player.data.numpad8B = shortcutData.num8animB;
                                player.data.numpad8C = shortcutData.num8animC;
                                player.data.numpad8D = shortcutData.num8animD;
                                player.data.numpad8Name = shortcutData.num8name;  
                                player.data.numpad9A = shortcutData.num9animA;
                                player.data.numpad9B = shortcutData.num9animB;
                                player.data.numpad9C = shortcutData.num9animC;
                                player.data.numpad9D = shortcutData.num9animD;
                                player.data.numpad9Name = shortcutData.num9name;      
                            });
                        }
                    })
                }
            })  
        }
    });

if you need more contact me :)


What's New in Version 1.1.0   See changelog

Released

- Style "Fix" - changed "client_packages\animationswechsler\index.html" and some CSS u can just override the old version :)
- UI now looks like Primary Screenshot

 

  • Like 3

User Feedback

Create an account or sign in to leave a review

You need to be a member in order to leave a review

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

There are no reviews to display.

×
×
  • Create New...