Skip to content
This repository has been archived by the owner on Jul 11, 2021. It is now read-only.

Support for weight system #49

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Support for weight system #49

wants to merge 2 commits into from

Conversation

efraim9
Copy link

@efraim9 efraim9 commented Mar 30, 2021

I wanted to use esx_inventoryhud_trunk for the newer item system. Weight. I made a simple switch function that decides if limit or weight system should be used. This code was tested on a server with +- 30 players so I think it is stable. I hope it is going to serve its purpose. I am still learning, so there are maybe some mistakes in the code, maybe it can be done easier.

@JohnnyS
Copy link

JohnnyS commented May 30, 2021

Gonna test this out think you may have helped me out!

@efraim9
Copy link
Author

efraim9 commented May 30, 2021

Gonna test this out think you may have helped me out!

Great, I hope it will help you. Pretty much the same code is required for inventoryhud too, but there were some things that had to be done differently. If you would need it too, I could look into it again.

@JohnnyS
Copy link

JohnnyS commented May 30, 2021

Gonna test this out think you may have helped me out!

Great, I hope it will help you. Pretty much the same code is required for inventoryhud too, but there were some things that had to be done differently. If you would need it too, I could look into it again.

So far the regular inventory hud seems to be working unless you would happen to know when you put it on give item it shows nearby players rp name?

@efraim9
Copy link
Author

efraim9 commented May 30, 2021

Gonna test this out think you may have helped me out!

Great, I hope it will help you. Pretty much the same code is required for inventoryhud too, but there were some things that had to be done differently. If you would need it too, I could look into it again.

So far the regular inventory hud seems to be working unless you would happen to know when you put it on give item it shows nearby players rp name?

The regular hud works in almost all things fine, some utilities like shops integrations or something like that I knew wasn't working properly because of weight/limit conflicts. I stumbled across it when I was using hotel storage inventoryhud integration with rcore_hotel.
The RP name, if I am correct, I think you can fetch rp name only using MySQL. I thought you could do it using xPlayer.get('firstname')/xPlayer.get('lastname') but it didn't work for me.
If you have some basic knowledge it can be pretty easily done, just look into other scripts where rp names are used and copy&paste&edit and you are probably done.

@JohnnyS
Copy link

JohnnyS commented May 30, 2021

Gonna test this out think you may have helped me out!

Great, I hope it will help you. Pretty much the same code is required for inventoryhud too, but there were some things that had to be done differently. If you would need it too, I could look into it again.

So far the regular inventory hud seems to be working unless you would happen to know when you put it on give item it shows nearby players rp name?

The regular hud works in almost all things fine, some utilities like shops integrations or something like that I knew wasn't working properly because of weight/limit conflicts. I stumbled across it when I was using hotel storage inventoryhud integration with rcore_hotel.
The RP name, if I am correct, I think you can fetch rp name only using MySQL. I thought you could do it using xPlayer.get('firstname')/xPlayer.get('lastname') but it didn't work for me.
If you have some basic knowledge it can be pretty easily done, just look into other scripts where rp names are used and copy&paste&edit and you are probably done.

That is true the inventory hud doesnt work in shops for me I am guessing cause of the limit, so I guess if you have anything for that that would be appreciated! HMU on discord if you want JohnnyS#6946

@efraim9
Copy link
Author

efraim9 commented May 30, 2021

Gonna test this out think you may have helped me out!

Great, I hope it will help you. Pretty much the same code is required for inventoryhud too, but there were some things that had to be done differently. If you would need it too, I could look into it again.

So far the regular inventory hud seems to be working unless you would happen to know when you put it on give item it shows nearby players rp name?

The regular hud works in almost all things fine, some utilities like shops integrations or something like that I knew wasn't working properly because of weight/limit conflicts. I stumbled across it when I was using hotel storage inventoryhud integration with rcore_hotel.
The RP name, if I am correct, I think you can fetch rp name only using MySQL. I thought you could do it using xPlayer.get('firstname')/xPlayer.get('lastname') but it didn't work for me.
If you have some basic knowledge it can be pretty easily done, just look into other scripts where rp names are used and copy&paste&edit and you are probably done.

That is true the inventory hud doesnt work in shops for me I am guessing cause of the limit, so I guess if you have anything for that that would be appreciated! HMU on discord if you want JohnnyS#6946

Sure, a friend request sent.
Efraim#7431

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants