Raised This Month: $ Target: $400
 0% 

[SOLVED] Pass 2 dimensional array in native


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 11-09-2011 , 08:48   [SOLVED] Pass 2 dimensional array in native
Reply With Quote #1

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:
public _find_ent_spawns(iPluginsiParams)
{
    new 
FloatflOrigins[MAX_ORIGINS][3]
        , 
i
    
;
        
    while(
i++ < MAX_ORIGINS)
    {
        if(!
SsGetOrigin(flOrigins[i]))
            break;
    }
    
    
// set_param_byref(1, flOrigins);
    // set_array_f(1, flOrigins, sizeof(flOrigins));
    
    
return i;

Calling plugin:
PHP Code:

if(cmd_access(idiLeveliCid1))
{
    new 
FloatflOrigins[MAX_ORIGINS][3]
        , 
iSpawns os_get_ent_spawns(flOrigins)
    ;
        
    
// Unfinished: Create entities & set them to spawns.
    // Write spawns to file.
        
    
log_amx("Found %s spawn points."iSpawns);        
}
    
return 
PLUGIN_HANDLED
__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.

Last edited by drekes; 11-10-2011 at 03:19.
drekes is offline
Send a message via MSN to drekes
 



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


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