Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » SSGM Help
Re: SSGM Help [message #275976 is a reply to message #275968] Sat, 28 July 2007 21:01 Go to previous messageGo to previous message
Whitedragon is currently offline  Whitedragon
Messages: 832
Registered: February 2003
Location: California
Karma:
Colonel
Wall command
class WallChatCommand : public ChatCommandClass {
	void Triggered(int ID,const TokenClass &Text,int ChatType) {
		GameObject *obj = Get_GameObj(ID); //Gets the gameobj of the player using the command.
		if (obj) {
			Vector3 Pos = Commands->Get_Position(obj);
			Pos.X += 3.0f;
			GameObject *Wall = Commands->Create_Object("GDI_Humm-vee_Player",Pos);
			Commands->Set_Model(Wall,"whatever");
			Console_Input(StrFormat("ppage %d Wall... Created",ID).c_str());
		}
	}
};
ChatCommandRegistrant<WallChatCommand> WallChatCommandReg("!wall",CHATTYPE_ALL,0,GAMEMODE_ALL);



The following will take the first word that comes after the command, treat it as a nick, and try to get the gameobj associated with it.
GameObject *obj = Get_GameObj_By_Player_Name(Text[1].c_str());


Black-Cell.net
Network Administrator (2003 - )

DragonServ, Renegade's first IRC interface bot
Creator and lead coder (2002 - )

Dragonade, Renegade's first server side modification
Lead coder (2005 - )
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Cinematics On Custom
Next Topic: need help with CnC_C130drop
Goto Forum:
  


Current Time: Sun Dec 22 05:39:49 MST 2024

Total time taken to generate the page: 0.00732 seconds