View Single Post
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 10-01-2010 , 21:22   Re: Dynamic number of arguments in functions
Reply With Quote #19

@abdul_rehman

pev() funcwiki
Code:
To retrieve an integer, supply no extra parameters.
To retrieve a float, pass a single float by reference.
To retrieve a string, pass a string array and max length.
The pev function itself returns an integer.
PHP Code:
new IntVar pevid pev_whatever ); 
Passing 1 additional param will pass a float byref.
PHP Code:
new Float:FloatVar;
pevid pev_whatever FloatVal ); 
Passing 2 additional params will pass a string byref for max length.
PHP Code:
new StringVar10 ];
pevid pev_whatever StringVar charsmaxStringVar ) ); 
__________________
Bugsy is offline