Jump to content

togn

Members
  • Posts

    6
  • Joined

  • Last visited

Posts posted by togn

  1. Found a list of weaponSlots, cycling through them, checking for weapon and then checking for ammo with natives, then parsing the same in the list. Works somewhat ok, but again, not for all weapons. Seems like weaponslot list isn't up to date - missing newer weapons. Cannot seem to find a better one though.

    Tried gettings the slot ids with  GET_WEAPONTYPE_SLOT(Hash weaponHash) but it returns 0s for most of the newer weapons. Ridiculous.

    const localPlayer = mp.players.local;
    const weaponSlots = new Set([1993361168,1277010230,932043479,690654591,1459198205,195782970,-438797331,896793492,495159329,-1155528315,-515636489,-871913299,-1352759032,-542958961,1682645887,-859470162,-2125426402,2067210266,-538172856,1783244476,439844898,-24829327,1949306232,-1941230881,-1033554448,320513715,-695165975,-281028447,-686713772,347509793,1769089473,189935548,248801358,386596758,-157212362,436985596,-47957369, 575938238]);
    
    function getWeaponTypeInSlot (weaponSlot) {
    	return mp.game.invoke('0xEFFED78E9011134D', localPlayer.handle, weaponSlot);
    }
    
    function getAmmoWeapon (weaponhash) {
    	return mp.game.invoke('0x015A522136D7F951', localPlayer.handle, weaponhash);
    }
    
    function getAllWeapons() {
        const weapons = {};
        weaponSlots.forEach(weaponSlot => {
            const weapon = getWeaponTypeInSlot(weaponSlot);
            if (weapon !== 0) {
                weapons[weapon] = { ammo: getAmmoWeapon(weapon) };
            }
        });
        return weapons;
    }

     

  2. I'm trying to save players' weapons on DC and load them when player reconnects. Tested this way, however, it doesn't seem to work reliably: for some weapons it works, but for most, it doesn't. For instance, for pistol it works perfectly, but for the same SpecialCarbine it returns 0's. While I hold SpecialCarbine in hand and test it for specialcarbine_mk2, it returns correct ammo count.

    I've tried using hashes plainly, same result. I don't think I'm messing anything up though.

    Any other way to save player weapons?

     

     

  3. Hi,

    I've followed the turorial best I could, but I'm rather a noob at this, so maybe I messed something up. Anyone would be able to help me with below? Seems like issues with MySQL (suggesting to upgrade it, even though I've just downloaded and installed it) and NodeMailer. I have no clue how to remedy this. Thanks in advance.

    Quote

    [N] Starting network... - OK: (IPv4-only) at 127.0.0.1:22005

    (node:17576) ExperimentalWarning: The ESM module loader is experimental.

    Loading maps:

            "fences.xml.json" loaded

    Loading packages

            "RP" loaded

    [2018-07-31T00:46:32.797] [FATAL] default - Server Started

    Started HTTP server at 22006 port.

    [2018-07-31T00:46:33.466] [ERROR] default - SELECT * FROM business INNER JOIN cheapcardealership ON business.id = cheapcardealership.id

    (node:17576) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server; consider upgrading MySQL client

    (node:17576) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

    [2018-07-31T00:46:33.469] [ERROR] default - SELECT * FROM business INNER JOIN clothingshop ON business.id = clothingshop.id

    (node:17576) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): Error: ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server; consider upgrading MySQL client

    [2018-07-31T00:46:33.471] [ERROR] default - SELECT * FROM business INNER JOIN barbershop ON business.id = barbershop.id

    (node:17576) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 3): Error: ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server; consider upgrading MySQL client

    [2018-07-31T00:46:33.474] [ERROR] default - SELECT * FROM business INNER JOIN gasstation ON business.id = gasstation.id

    (node:17576) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 4): Error: ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server; consider upgrading MySQL client

    { Error: Invalid login: 534-5.7.14 <https://accounts.google.com/signin/continue?sarp=1&scc=1&plt=AKgnsbvO

    534-5.7.14 yFFMcLMwWXWvPb3h0UpsDQ8nrM2usW0Lk-2nolDv-R-TqVzrhhzrbtG5pIfFXiNwsn9bhn

    534-5.7.14 5rl7emRZteHfgri0seifu3wWEVYmYEN0gu_wwrrSBobggGBWyi2fC0wQMfeEEMCn3AcEmF

    534-5.7.14 wI1dGjfCOZ7ASCZnKP_c_Zxpfzz_HIBpJu09DSXqS9V06k4GJePDERqATnAp4zmhI5qiFn

    534-5.7.14 He-tZL9z8dlIp52hEKic6h0T92zTCkYCDpdczABNKpcoAwRru0> Please log in via

    534-5.7.14 your web browser and then try again.

    534-5.7.14  Learn more at

    534 5.7.14 https://support.google.com/mail/answer/78754 d23-v6sm2252499ljg.17 - gsmtp

        at SMTPConnection._formatError (C:\gm\RAGEMP\server-files\node_modules\nodemailer\lib\smtp-connection\index.js:606:19)

        at SMTPConnection._actionAUTHComplete (C:\gm\RAGEMP\server-files\node_modules\nodemailer\lib\smtp-connection\index.js:1335:34)

        at SMTPConnection._responseActions.push.str (C:\gm\RAGEMP\server-files\node_modules\nodemailer\lib\smtp-connection\index.js:366:26)

        at SMTPConnection._processResponse (C:\gm\RAGEMP\server-files\node_modules\nodemailer\lib\smtp-connection\index.js:762:20)

        at SMTPConnection._onData (C:\gm\RAGEMP\server-files\node_modules\nodemailer\lib\smtp-connection\index.js:558:14)

        at TLSSocket._socket.on.chunk (C:\gm\RAGEMP\server-files\node_modules\nodemailer\lib\smtp-connection\index.js:510:47)

        at TLSSocket.emit (events.js:159:13)

        at addChunk (_stream_readable.js:265:12)

        at readableAddChunk (_stream_readable.js:252:11)

        at TLSSocket.Readable.push (_stream_readable.js:209:10)

      code: 'EAUTH',

      response: '534-5.7.14 <https://accounts.google.com/signin/continue?sarp=1&scc=1&plt=AKgnsbvO\n534-5.7.14 yFFMcLMwWXWvPb3h0UpsDQ8nrM2usW0Lk-2nolDv-R-TqVzrhhzrbtG5pIfFXiNwsn9bhn\n534-5.7.14 5rl7emRZteHfgri0seifu3wWEVYmYEN0gu_wwrrSBobggGBWyi2fC0wQMfeEEMCn3AcEmF\n534-5.7.14 wI1dGjfCOZ7ASCZnKP_c_Zxpfzz_HIBpJu09DSXqS9V06k4GJePDERqATnAp4zmhI5qiFn\n534-5.7.14 He-tZL9z8dlIp52hEKic6h0T92zTCkYCDpdczABNKpcoAwRru0> Please log in via\n534-5.7.14 your web browser and then try again.\n534-5.7.14  Learn more at\n534 5.7.14 https://support.google.com/mail/answer/78754 d23-v6sm2252499ljg.17 - gsmtp',

      responseCode: 534,

      command: 'AUTH PLAIN' }

     

  4. Stupid question, I guess, how do I get the console working? When launching server.exe it opens up, but it's inactive - cannot enter anything. GUI doesn't work either - index.html is empty page, tried every browser.

    Yeah I'm a noob.

×
×
  • Create New...