[Help] How to use SetHamItemInfo correctly?
Hi, i have a problem using this native.
Code:
/**
my code
Ham module from amx183: Code:
amxx version |
Re: [Help] How to use SetHamItemInfo correctly?
Try registering it in plugin_precache. I remember playing with and it only worked in precache.
|
Re: [Help] How to use SetHamItemInfo correctly?
Quote:
|
Re: [Help] How to use SetHamItemInfo correctly?
There is something wrong somewhere. When I get the AK, and I want to buy ammos, I see Money called until I can't afford to buy them. It sounds like when it loops to give ammos, some check doesn't do the expected job to stop it. Maybe something wrong with if (player->m_rgAmmo[nAmmo] >= weapon->iMaxAmmo1()), is iMaxAmmo1 holding proper value? It should, as I see well the new value in WeaponList message and this uses ItemInfoArray to pass the value. Problem seems to be elsewhere.
|
Re: [Help] How to use SetHamItemInfo correctly?
I know partially why it doesn't work.
It's because, for example AK47, MaxAmmo is 90 and is hardcoded in C762NatoAmmo::AddAmmo(), more as param in GiveAmmo. So all you need to do is to hook Ham_GiveAmmo and changing last param with your new value. I've tested it, it works fine. |
Re: [Help] How to use SetHamItemInfo correctly?
Quote:
|
| All times are GMT -4. The time now is 09:41. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.