Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » spwaners code
spwaners code [message #354350] Tue, 14 October 2008 10:51 Go to previous message
snazy2000 is currently offline  snazy2000
Messages: 67
Registered: December 2007
Karma:
Recruit
i have made this code bt it dont work in game

class gspawnerChatCommand : public ChatCommandClass {
void Triggered(int ID,const TokenClass &Text,int ChatType) {
GameObject *obj = Get_GameObj(ID);
Vector3 position;
position = Commands->Get_Position(obj);
position.Z += 1.20;
position.X += (float)(5*cos(Commands->Get_Facing(Get_GameObj(ID))*(3.14 / 180)));
position.Y += (float)(5*sin(Commands->Get_Facing(Get_GameObj(ID))*(3.14 / 180)));
GameObject *dave = Commands->Create_Object("Invisible_Object", position);
Commands->Attach_To_Object_Bone(dave, obj, "GDI Spawner");
}
};
ChatCommandRegistrant<gspawnerChatCommand> gspawnerChatCommandReg("!gdisp",CHATTYPE_ALL,0,GAMEMODE_ALL);


it doesnt crash but i dont no if makes spawner biut it never sends me to it have i done something rong??
 
Read Message
Read Message
Previous Topic: Fix scope?
Next Topic: Presets:
Goto Forum:
  


Current Time: Wed Dec 04 13:03:17 MST 2024

Total time taken to generate the page: 0.00609 seconds