Raised This Month: $ Target: $400
 0% 

Get global via native


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Rirre
Veteran Member
Join Date: Nov 2006
Old 08-29-2013 , 11:20   Get global via native
Reply With Quote #1

I don't really know how I can get g_ammo from the main plugin.
Only found about boolean and string.

Main plugin:
Code:
new g_ammo[33] public plugin_natives() {     register_native("g_ammo", "_g_ammo", 1) } public _g_ammo(id) {     return g_ammo[id] }
Example of Sub-Plugin, so I know it's wrong. Just explaining and hope you understand what I mean.
Sub-Plugin:
Code:
native g_ammo(id) stock _g_ammo(id) return g_ammo(id) public function(id) {     if(_g_ammo[id] < get_cvar_num("ammo"))     {         _g_ammo[id]++     } }

Last edited by Rirre; 08-29-2013 at 11:20.
Rirre is offline
 



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 19:14.


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