Get global via native
I don't really know how I can get g_ammo from the main plugin.
Only found about boolean and string. Main plugin: Code:
Sub-Plugin: Code:
|
Re: Get global via native
There is a tutorial about dynamic natives.
Also, i think i have read that style 1 is deprecated, so use rather style 0. |
Re: Get global via native
|
Re: Get global via native
Bumping since I don't understand the difference with either style 0 or 1. Have searched and read through the thread several times and still do not get it.
Also in need of help with this: Code:
|
Re: Get global via native
What are you trying to achieve? The code above makes no sense to me.
|
Re: Get global via native
Quote:
After the slashes is how I want it in the sub-plugin to return the damage done by a player to a entity. gDamageDone (get_param(1), get_param(2), get_param(3)) |
Re: Get global via native
Well, here is what am I using.
PHP Code:
P.S.: IsDedicated stuff, for the most clear check (because it depends for the loop. If the server is dedicated, they begin from 1, otherwise, they begin from 0). Thanks to Black Rose (again)! |
Re: Get global via native
Quote:
|
Re: Get global via native
return g_iDamage[get_param(1), get_param(2)] += get_param(3)// gDoneDamage(id, victim, damage)
-->> return g_iDamage[id][victim] += get_param(3); |
| All times are GMT -4. The time now is 19:14. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.