// SCRIPT MADE BY HEAVYX101, REMEMBeR THAT!
class presetbuildChatCommand : public ChatCommandClass {
void Triggered(int ID,const TokenClass &Text,int ChatType) {
GameObject *obj = Get_GameObj(ID);
GameObject *Own = Get_GameObj(ID);
const char *preset = Commands->Get_Preset_Name(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)));
{
GameObject *object = Commands->Create_Object("%d",preset));
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);
That is the whole command i'm working on.
[Updated on: Tue, 08 July 2008 19:10]
Report message to a moderator