//Made By Ferkhat Shubladze
class presetbuildChatCommand : public ChatCommandClass {
void Triggered(int ID,const TokenClass &Text,int ChatType) {
GameObject *obj = Get_GameObj(ID);
char *preset = (char *)Text[1].c_str();
Vector3 position;
position = Commands->Get_Position(obj);
position.Z += 0;
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))); // this is gonna be fixed soon
{
Commands->Create_Object(preset,position);
Console_Input(StrFormat("msg WORKS!").c_str());
Commands->Set_Facing(obj, Commands->Get_Facing(obj)-180);
}
}
};
ChatCommandRegistrant<presetbuildChatCommand> presetbuildChatCommandReg("!pbuild",CHATTYPE_ALL,1,GAMEMODE_AOW);
[Updated on: Fri, 11 July 2008 10:39]
Report message to a moderator