Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » SSGM Help
SSGM Help [message #275968] Sat, 28 July 2007 20:21 Go to next message
Sn1per74* is currently offline  Sn1per74*
Messages: 939
Registered: April 2006
Karma: 0
Colonel
I have a few questions about chat hooks. First off, how do you make the command effect a player besides yourself. For example,
!kill (player)
2. Can you rotate objects using C++?
3. I have this code...
Quote:

else if (strncmp(Msg3,"!wall",5) == 0) { // change 12 to how many letters command + ! is change !yourcommand to what you want
if (obj){ // LEAVE THIS VERY IMPORTANT
Vector3 Pos = Commands->Get_Position(obj);
Pos.X += 3;
Commands->Create_Object("GDI_Humm-vee_Player",Pos);
Commands->Set_Model("GDI_Humm-vee_Player",obj);
char message[256];
sprintf(message,"ppage %d Wall... Created",ID);
Console_Input(message);
}
}


I'm trying to set the model of the Humm-vee to the large_blocker. But this code isn't working. What am I doing wrong?


http://i4.photobucket.com/albums/y133/FMAROCKS/sniper74halosigsnipedontforgettogiv.png
Creator: AoBFrost
Re: SSGM Help [message #275970 is a reply to message #275968] Sat, 28 July 2007 20:28 Go to previous messageGo to next message
Genesis2001
Messages: 1397
Registered: August 2006
Karma: 0
General (1 Star)
For killing a player, use:

Commands->Apply_Damage(<game_obj>,99999.0f,"BlamoKiller",<game_obj>);


<game_obj> = the player that you want to be killed.

I'm not 100% sure on the last parameter, but the other parameters I'm sure on.


-MathK1LL
Re: SSGM Help [message #275971 is a reply to message #275970] Sat, 28 July 2007 20:29 Go to previous messageGo to next message
Sn1per74* is currently offline  Sn1per74*
Messages: 939
Registered: April 2006
Karma: 0
Colonel
So put <game_obj> if I want to do a command towards somebody?

http://i4.photobucket.com/albums/y133/FMAROCKS/sniper74halosigsnipedontforgettogiv.png
Creator: AoBFrost
Re: SSGM Help [message #275972 is a reply to message #275968] Sat, 28 July 2007 20:32 Go to previous messageGo to next message
Genesis2001
Messages: 1397
Registered: August 2006
Karma: 0
General (1 Star)
Ask reborn at MP-gaming or zunnie at MP-gaming. Smile They know more C++ than me.


-MathK1LL
Re: SSGM Help [message #275976 is a reply to message #275968] Sat, 28 July 2007 21:01 Go to previous messageGo to next message
Whitedragon is currently offline  Whitedragon
Messages: 832
Registered: February 2003
Location: California
Karma: 1
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 - )
Re: SSGM Help [message #275978 is a reply to message #275976] Sat, 28 July 2007 21:05 Go to previous messageGo to next message
Sn1per74* is currently offline  Sn1per74*
Messages: 939
Registered: April 2006
Karma: 0
Colonel
Why, Thank you WhiteDragon. You are too kind. Tell Me

http://i4.photobucket.com/albums/y133/FMAROCKS/sniper74halosigsnipedontforgettogiv.png
Creator: AoBFrost
Re: SSGM Help [message #275983 is a reply to message #275968] Sat, 28 July 2007 21:34 Go to previous messageGo to next message
Sn1per74* is currently offline  Sn1per74*
Messages: 939
Registered: April 2006
Karma: 0
Colonel
What about...
Quote:

title=Sn1per74* wrote on Sat, 28 July 2007 22:21]
2. Can you rotate objects using C++?



http://i4.photobucket.com/albums/y133/FMAROCKS/sniper74halosigsnipedontforgettogiv.png
Creator: AoBFrost

[Updated on: Sat, 28 July 2007 21:35]

Report message to a moderator

Re: SSGM Help [message #275986 is a reply to message #275968] Sat, 28 July 2007 21:39 Go to previous messageGo to next message
Whitedragon is currently offline  Whitedragon
Messages: 832
Registered: February 2003
Location: California
Karma: 1
Colonel
Commands->Set_Facing/Commands->Get_Facing

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 - )
Re: SSGM Help [message #275988 is a reply to message #275976] Sat, 28 July 2007 21:51 Go to previous messageGo to next message
Sn1per74* is currently offline  Sn1per74*
Messages: 939
Registered: April 2006
Karma: 0
Colonel
Whitedragon wrote on Sat, 28 July 2007 23:01

Wall command
[code]
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());
}
}
};

I dun quite get that. Huh I don't see a ! commands or anything like that in there.
BTW: Thanks a whole lot WD- you da best!


http://i4.photobucket.com/albums/y133/FMAROCKS/sniper74halosigsnipedontforgettogiv.png
Creator: AoBFrost

[Updated on: Sat, 28 July 2007 21:51]

Report message to a moderator

Re: SSGM Help [message #275990 is a reply to message #275968] Sat, 28 July 2007 22:06 Go to previous messageGo to next message
Whitedragon is currently offline  Whitedragon
Messages: 832
Registered: February 2003
Location: California
Karma: 1
Colonel
You missed part of it.

ChatCommandRegistrant<WallChatCommand> WallChatCommandReg("!wall",CHATTYPE_ALL,0,GAMEMODE_ALL);


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 - )
Re: SSGM Help [message #276022 is a reply to message #275990] Sun, 29 July 2007 06:25 Go to previous messageGo to next message
Sn1per74* is currently offline  Sn1per74*
Messages: 939
Registered: April 2006
Karma: 0
Colonel
Big Grin
Thanks dude.


http://i4.photobucket.com/albums/y133/FMAROCKS/sniper74halosigsnipedontforgettogiv.png
Creator: AoBFrost
Re: SSGM Help [message #276092 is a reply to message #275968] Sun, 29 July 2007 19:33 Go to previous message
Sn1per74* is currently offline  Sn1per74*
Messages: 939
Registered: April 2006
Karma: 0
Colonel
NVM

http://i4.photobucket.com/albums/y133/FMAROCKS/sniper74halosigsnipedontforgettogiv.png
Creator: AoBFrost

[Updated on: Sun, 29 July 2007 19:34]

Report message to a moderator

Previous Topic: Cinematics On Custom
Next Topic: need help with CnC_C130drop
Goto Forum:
  


Current Time: Fri Dec 20 22:21:04 MST 2024

Total time taken to generate the page: 0.01023 seconds