Raised This Month: $51 Target: $400
 12% 

Solved Entity Ammo&BpAmmo Offsets | Get Entity size |


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 02-04-2018 , 07:12   Entity Ammo&BpAmmo Offsets | Get Entity size |
Reply With Quote #1

Hi,

I was wondering if it was possible to change the default ammo and bpammo of armoury_entity entities.
I tried hooking Ham_CS_Restart and then used these offsets, but it didn't work.

Code:
const m_iCount = 35; const m_iClipAmmo = 51;

What are the offsets for ammo and bpammo?

&

Is there any stock to get an entity's size? I saw there's one for AMXX 1.8.3 but that's not any useful to me.

Thanks

Last edited by edon1337; 07-19-2018 at 08:54.
edon1337 is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 02-04-2018 , 07:56   Re: Entity Ammo&BpAmmo Offsets | Get Entity size |
Reply With Quote #2

armoury_entity entities don't have those properties. weaponbox entities do however.

You can retrieve pev_size?
__________________
klippy is offline
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 02-04-2018 , 08:21   Re: Entity Ammo&BpAmmo Offsets | Get Entity size |
Reply With Quote #3

Quote:
Originally Posted by KliPPy View Post
armoury_entity entities don't have those properties.
So there's no way of changing the ammo and backpack ammo of armoury_entity entities?

Quote:
Originally Posted by KliPPy View Post
You can retrieve pev_size?
I mean how to get a model's size if it doesn't have one specified.. I have a model and I don't know what sizes to set for it so it can be perfectly bounded.
__________________
edon1337 is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 02-04-2018 , 11:05   Re: Entity Ammo&BpAmmo Offsets | Get Entity size |
Reply With Quote #4

Quote:
Originally Posted by edon1337 View Post
So there's no way of changing the ammo and backpack ammo of armoury_entity entities?
Not within the game. You have to create that behavior on your own.

Quote:
Originally Posted by edon1337 View Post
I mean how to get a model's size if it doesn't have one specified.. I have a model and I don't know what sizes to set for it so it can be perfectly bounded.
Trial and error. Even if there was a proper and easy way to do it, you have to consider that different frames of sequences can have different sizes. So you use whatever size suits you the most.
__________________

Last edited by klippy; 02-04-2018 at 11:05.
klippy is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 02-04-2018 , 11:23   Re: Entity Ammo&BpAmmo Offsets | Get Entity size |
Reply With Quote #5

I showed you that game retrieves this values from an array, they are hard coded.
You can always hook touch and alter how much ammo the player gets.
__________________
HamletEagle is offline
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 02-04-2018 , 11:31   Re: Entity Ammo&BpAmmo Offsets | Get Entity size |
Reply With Quote #6

Quote:
Originally Posted by HamletEagle View Post
You can always hook touch and alter how much ammo the player gets.
Yeah, but I'd have to make sure he didn't just drop the weapon and pick it up again just to re-fill it. I guess I'll just throw armoury_entity away and move to weaponbox. Too much limitations.

Quote:
Originally Posted by KliPPy View Post
Trial and error. Even if there was a proper and easy way to do it, you have to consider that different frames of sequences can have different sizes. So you use whatever size suits you the most.
How would I know that it is bounded well? I'm a newbie in models.. What are the characteristics that I should look for when playing with sizes?
__________________
edon1337 is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 02-04-2018 , 12:03   Re: Entity Ammo&BpAmmo Offsets | Get Entity size |
Reply With Quote #7

Quote:
Originally Posted by edon1337 View Post
Yeah, but I'd have to make sure he didn't just drop the weapon and pick it up again just to re-fill it. I guess I'll just throw armoury_entity away and move to weaponbox. Too much limitations.
When you drop a weapon it's no longer armoury_entity, it's weaponbox.



Quote:
Originally Posted by edon1337 View Post
How would I know that it is bounded well? I'm a newbie in models.. What are the characteristics that I should look for when playing with sizes?
You will know when you are happy with it.
__________________
klippy is offline
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 02-04-2018 , 13:09   Re: Entity Ammo&BpAmmo Offsets | Get Entity size |
Reply With Quote #8

Quote:
Originally Posted by KliPPy View Post
When you drop a weapon it's no longer armoury_entity, it's weaponbox.
Yeah I'm aware of that.
So you're saying, hook touch with armoury_entity and then set player's ammo & bpammo?
__________________
edon1337 is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 03:33.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode