Home » Renegade Discussions » Mod Forum » XYZ
Re: XYZ [message #330748 is a reply to message #330691] |
Fri, 16 May 2008 09:12 |
|
mrãçķz
Messages: 3069 Registered: August 2007
Karma:
|
General (3 Stars) Permabanned for trying and failing DDoS |
|
|
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);
[Updated on: Fri, 16 May 2008 09:12] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Tue Feb 04 05:00:16 MST 2025
Total time taken to generate the page: 0.01561 seconds
|