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??