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:
#include <amxmodx>
const MAX_ORIGINS = 5;
const ORIGIN_SIZE = 3;
new Float:TestFloats[ MAX_ORIGINS ][ ORIGIN_SIZE ] =
{
{ 1.2 , 3.4 , 5.6 },
{ 2.1 , 4.2 , 6.5 },
{ 1.1 , 2.2 , 3.3 },
{ 4.4 , 5.5 , 6.6 },
{ 7.7 , 8.8 , 9.9 }
};
native os_get_ent_spawns( Float:fOrigins[] , iSize );
public plugin_natives()
{
register_native( "os_get_ent_spawns" , "_find_ent_spawns" );
}
public plugin_init()
{
register_plugin( "Get Native Float Array" , "0.1" , "bugsy" );
register_concmd( "t" , "Test" );
}
public Test( )
{
new Float:flOrigins[ MAX_ORIGINS * ORIGIN_SIZE ];
os_get_ent_spawns( flOrigins , MAX_ORIGINS );
for ( new i = 0 ; i < MAX_ORIGINS ; i++ )
{
server_print( "Origin%d = %f %f %f" , i+1 , flOrigins[ ( i * ORIGIN_SIZE ) + 0 ] , flOrigins[ ( i * ORIGIN_SIZE ) + 1 ] , flOrigins[ ( i * ORIGIN_SIZE ) + 2 ] );
}
}
public _find_ent_spawns( iPlugins , iParams )
{
const CELL_SIZE = 4;
const ORIGIN_CELL_SIZE = ORIGIN_SIZE * CELL_SIZE;
new iVar = get_param( 1 );
new iMax = get_param( 2 );
for ( new i = 0 ; i < iMax ; i++ )
{
set_addr_val( iVar + ( i * ORIGIN_CELL_SIZE ) + ( 0 * CELL_SIZE ) , _:TestFloats[ i ][ 0 ] );
set_addr_val( iVar + ( i * ORIGIN_CELL_SIZE ) + ( 1 * CELL_SIZE ) , _:TestFloats[ i ][ 1 ] );
set_addr_val( iVar + ( i * ORIGIN_CELL_SIZE ) + ( 2 * CELL_SIZE ) , _:TestFloats[ i ][ 2 ] );
}
}
__________________