I would do with an enum(), I think.
Code:
enum t_TaskTest
{
Float:fValue1,
iValue2,
String
};
new g_Params[ t_TaskTest ];
function( id )
{
g_Params[ fValue1 ] = _:14.25;
g_Params[ iValue2 ] = 10;
g_Params[ String ] = EncodeText( "Hello word!" );
set_task( 1.0, "TestTask", id, g_Params, t_TaskTest );
}
public TestTask( g_Params[] )
{
static sText[16];
DecodeText( g_Params[ String ], sText, charsmax( sText ) );
log_amx( "fValue = %.2f | iValue = %i | String = %s", g_Params[ fValue1 ], g_Params[ iValue2 ], sText );
}
EncodeText( const text[] )
{
return engfunc( EngFunc_AllocString, text )
}
DecodeText( const text, string[], const length )
{
global_get( glb_pStringBase, text, string, length )
}
And it returns :
Code:
[Untitled.amxx] fValue = 14.25 | iValue = 10 | String = Hello word!
It requires fakemeta if you planned to use with string.
__________________