Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » Ingame Error?
Re: Ingame Error? [message #273956 is a reply to message #273263] Wed, 18 July 2007 00:11 Go to previous messageGo to previous message
dead6re is currently offline  dead6re
Messages: 602
Registered: September 2003
Karma:
Colonel
Oh sorry, My code was to act on yourself.

class testChatCommand : public ChatCommandClass {
	void Triggered(int ID,const TokenClass &Text,int ChatType) {
		 if (Is_Mod("Test_Mods.txt",Get_Player_Name_By_ID(ID))) {
			 Get_GameObj_By_Player_Name(Text[1].c_str()); // Gets GameObj using Player Name
			 Change_Character(obj, "GDI_MP");
			 Commands->Attach_Script(obj, "JFW_Permanent_No_Falling_Damage", ""); // Prevent obj from recieving falling damage
			 Commands->Give_Powerup(obj,"CnC_POW_AutoRifle_Player_GDI", ""); // Give GDI Auto Rifle

			 SimpleDynVecClass<GameObject*> List = Get_All_Objects_By_Preset(2,"Signal_Flares"); // Get a list of all the flares (MAKE SURE THE TEAM IS SET TO 2! WILL NOT WORK OTHERWISE)
			 int id = Commands->Get_Random_Int(0, List.Count()-1) // C++ always starts at 0, not 1 therefore -1 :)
			 GameObject *RandObj = List[id]; // Pick the GameObj
			 Commands->Set_Position(obj, Commands->Get_Position(RandObj)); // Move the position of your GameObj to the flare!
		 }
		 else {
			 char Bad[256];
			 sprintf(Bad, "ppage %d You do not have access to this command", ID);
			 Console_Input(Bad);
		 }
	}
}


Let all your wishes be granted except one, so you will still have something to strieve for.

[Updated on: Wed, 18 July 2007 00:11]

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
Read Message
Read Message
Read Message
Previous Topic: Help me plz!!(me n00b)
Next Topic: Cinematics help!
Goto Forum:
  


Current Time: Wed Nov 06 12:25:29 MST 2024

Total time taken to generate the page: 0.01151 seconds