Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » Ingame Error?
Re: Ingame Error? [message #273334 is a reply to message #273299] Sun, 15 July 2007 05:56 Go to previous messageGo to previous message
dead6re is currently offline  dead6re
Messages: 602
Registered: September 2003
Karma:
Colonel
a100 wrote on Sun, 15 July 2007 04:31

Are you sure they have enabled collision properties?


PS. Looking at the code, dont continuasly open the file and read from it everytime the command is called on because it will lag the server and will crash it sometimes. Or atleast thats what happned to me.


Opening/Closing a file won't crash your server. I always did that until I wrote my "cache ini class".


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))) {
			 GameObject *obj = Get_GameObj(ID); // Gets GameObj using Player ID
			 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.
 
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:24:32 MST 2024

Total time taken to generate the page: 0.00876 seconds