Raised This Month: $ Target: $400
 0% 

forward_return questions


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Silencer123
Veteran Member
Join Date: Jul 2006
Old 06-01-2009 , 15:27   forward_return questions
Reply With Quote #1

Some forwards - many forwards - deliver many parameters. E.g.:
Code:
FM_EmitSound void (ent, iChannel, const szSample[], Float:fVolume, Float:fAttenuation, iFlags, iPitch)
Now, I know how to change one single parameter using forward_return, but how would I
go about changing all the parameters in a function/method called by register_forward?

Like this?
Code:
public method(int, Float:flt, const string[]) {      forward_return(FMV_CELL, new_int, FMV_FLOAT, new_flt, FMV_STRING, new_string);      return FMRES_SUPERCEDE;  }


Or like this?
Code:
public method(int, Float:flt, const string[]) {       forward_return(FMV_CELL, new_int);      forward_return(FMV_FLOAT, new_flt);      forward_return(FMV_STRING, new_string);      return FMRES_SUPERCEDE;   }

Or some way completely different?

Then, what exactly is "FMV_CELL"? As far as I know there are only
FMV_CELL, FMV_FLOAT and FMV_STRING, so FMV_CELL would be for
integers, wouldn't it?

Then, what about arrayed floats like origin[3], velocity[3], vector[3] and angles[3]?

Then, as const string[] is given as a constant, can it even be changed
by forward_return?

Also, can a forward be executed via ExecuteForward while a forward is "in progress",
as in, from within a to a forward hooked method?
__________________
EAT YOUR VEGGIES
Silencer123 is offline
 



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 13:53.


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