[SOLVED] Pass 2 dimensional array in native
I'm trying to find random origins using Joropito's random location generator & pass those locations to calling plugins. But i can't find out how to pass multi-dimensional arrays using natives.
native function: PHP Code:
PHP Code:
|
Re: Pass 2 dimensional array in native
You might not be able to send more than a single dimension through the fake natives.
What I would suggest you do instead would be to have a native for how many spawns were created, and then a second for getting a specific spawn. eg: Code:
new flOrigins[MAX_ORIGINS][3]; |
Re: Pass 2 dimensional array in native
Okay. Thank you Emp`
|
Re: [SOLVED] Pass 2 dimensional array in native
|
Re: [SOLVED] Pass 2 dimensional array in native
I know that you solved your problem with Emps solution but I was bored and decided to do it anyway. This will read the TestFloats array into flOrigins through the native function. Not the prettiest thing in the world for referencing the origins since you are using a 1-dimension array and doing everything manually but that can probably be cleaned up with macros.
PHP Code:
|
Re: [SOLVED] Pass 2 dimensional array in native
I've looked at your previous post too but i have a hard time understanding how they both work.
I'm using Emp's solution now also because i can get just 1 free origin instead of filling an entire array everytime. |
| All times are GMT -4. The time now is 14:21. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.