Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » It's there a Grant Power Up script?
Re: It's there a Grant Power Up script? [message #468006 is a reply to message #467945] Sat, 26 May 2012 02:54 Go to previous messageGo to previous message
iRANian is currently offline  iRANian
Messages: 4309
Registered: April 2011
Karma:
General (4 Stars)
You need to attach the arguments to a script to the last argument of Attach_Script_Once() and related functions, if a script has more than one arguments you need to do something like:

Attach_Script_Once(obj, "script_name", "1024,derp,4.5");


where 1024 is an int, derp is a string and 4.5 is a float. In most cases you want to supply a "params" char buffer that contains the arguments formatted with a sprintf before hand, like so:

			char params[256];
			sprintf(params,"%d,%s,%s,%s,%s,%s",param,Get_Parameter("Underwater_Effect_Controller"),Get_Parameter("Surface_Water_Effect"),Get_Parameter("Underwater_Effect"),Get_Parameter("Surface_Swim_Sound"),Get_Parameter("Underwater_Swim_Sound"));
			Attach_Script_Once(sender,"JMG_Swimming_Water_Effects_Script",params);


Long time and well respected Renegade community member, programmer, modder and tester.

Scripts 4.0 private beta tester since May 2011.

My Renegade server plugins releases

[Updated on: Sat, 26 May 2012 02:55]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Hand of Nod WIP
Next Topic: Need help please
Goto Forum:
  


Current Time: Tue Dec 31 21:35:40 MST 2024

Total time taken to generate the page: 0.00895 seconds