Raised This Month: $ Target: $400
 0% 

Solved [ H3LP ] 2d dynamic array


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 06-27-2018 , 16:28   [ H3LP ] 2d dynamic array
Reply With Quote #1

Hello, is there any way to pass 2d array through native?

Example:
Code:
new const g_szClassWeapons[][] = { "Weapon 1", "Weapon 2", "Weapon 3" }; public test() {     native_test(g_szClassWeapons, sizeof g_szClassWeapons); } ... public _native_test(iPluginId, iParamsCount) {     new szWeapon[][];     new iArraySize = get_param(2);     get_array(1, szWeapon, iArraySize);     for (new i = 0; i < iArraySize; i++)         server_print("Weapon[%d] = %s", i, szWeapon[i]); }
__________________









Last edited by CrazY.; 06-27-2018 at 18:28.
CrazY. 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 12:24.


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