alienwave

Get Vehicle Hash

Recommended Posts

I take the " vehicle.getLayoutHash()" and use it like this:

mp.events.addCommand('hash', (player) => {
    let vehicle = player.vehicle;
    vehicle.getLayoutHash(vehicle);
})

But when I enter a command in the vehicle, the console tells me the following:

 TypeError: vehicle.getLayoutHash is not a function
    vehicle.getLayoutHash(vehName);

What should I do?

Share this post


Link to post
Share on other sites

getLayoutHash() is a clientside function.

Share this post


Link to post
Share on other sites
4 минуты назад, Xabi сказал:

getLayoutHash() is a clientside function.

Thx, I'll try it later

Share this post


Link to post
Share on other sites
Posted (edited)
const vehicle = mp.players.local.vehicle;
mp.gui.chat.push(`hash: ${vehicle.getLayoutHash()}`);

It works, thanks, but for some reason, the hash is just a set of numbers. For example:

ZTYPE: 0x2D3BD401,
AMGGT: 2228715155

ZTYPE is ok, but AMGGT...

Edited by alienwave

Share this post


Link to post
Share on other sites

The first value seems to be HEX and the second one decimal.

Share this post


Link to post
Share on other sites
Posted (edited)
2 минуты назад, Xabi сказал:

The first value seems to be HEX and the second one decimal.

How can i convert decimal to HEX? By using the sites or have a function?

Edited by alienwave

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

  • Recently Browsing   0 members

    No registered users viewing this page.