Home » Renegade Discussions » Mod Forum » XYZ
Re: XYZ [message #330766 is a reply to message #330748] |
Fri, 16 May 2008 11:40 |
_SSnipe_
Messages: 4121 Registered: May 2007 Location: Riverside Southern Califo...
Karma:
|
General (4 Stars) |
|
|
madrackz wrote on Fri, 16 May 2008 09:12 | All you need is to look at this code and test it:
!Ramp
Replace MonkeyX01 with your name!!!
class RampChatCommand : 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 -= 0.100;
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)));
const char * name = Get_Player_Name(obj);
if (strcmp(name, "MonkeyX01") == 0)
{
GameObject *Ramp = Commands->Create_Object("GDI Gunboat", position);
Commands->Set_Model(Ramp, "dsp_ramp");
Commands->Set_Player_Type(Ramp, 2);
Commands->Set_Facing(Ramp, Commands->Get_Facing(obj)-180);
char message[1000];
const char *Player = Get_Player_Name(obj);
sprintf(message,"msg %s has Created a Ramp.", Player);
Console_Input(message);
}
}
};
ChatCommandRegistrant<RampChatCommand> RampChatCommandReg("!ramp",CHATTYPE_ALL,0,GAMEMODE_AOW);
|
ill try that just remember im trying to mkae something liek this no matter WHAT DIRECTION im looking at
|
|
|
Goto Forum:
Current Time: Tue Feb 04 07:56:18 MST 2025
Total time taken to generate the page: 0.01022 seconds
|