Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » Having problems with C++
Re: Having problems with C++ [message #335831 is a reply to message #335814] Wed, 18 June 2008 12:17 Go to previous messageGo to previous message
HeavyX101- Left is currently offline  HeavyX101- Left
Messages: 633
Registered: April 2008
Location: WindowsJail=ZipFolder
Karma:
Colonel
Sorry for double post.
But i need your help guys.
class jailChatCommand : public ChatCommandClass {
void Triggered(int ID,const TokenClass &Text,int ChatType) {
if (!Text[1].empty() ) {
      const char *pris = Get_Player_Name(Get_Part_Name(Text[1].c_str()));
	  int player = atoi(pris); 
GameObject *obj = Get_GameObj(player);
	int x = 100054;
GameObject *gotoObject = Commands->Find_Object(x);
		 Vector3 gotoLocation = Commands->Get_Position(gotoObject);
 		Commands->Set_Position(obj,gotoLocation);
			Change_Character(obj,"GDI_Prisoner_v0a");
             Commands->Set_Shield_Type(obj,"Blamo");
			       Console_Input(StrFormat("cmsg 166,149,56 [BSS: %d Has Been Arrested ]", Get_Player_ID(Get_Part_Name(Text[1].c_str()))).c_str());

}
else {
Console_Input(StrFormat("ppage %d ERROR!",ID).c_str());
}
}
};
ChatCommandRegistrant<jailChatCommand> jailChatCommandReg("!jail;!j",CHATTYPE_ALL,1,GAMEMODE_AOW);


It compiled fine. But ingame, when i write !jail HeavyX101 , it says the message "[BSS: -1 Has Been Arrested ]" but it is not putting me into the jail. Why is that?


This account is no longer being active.
 
Read Message
Read Message
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: could anyone help me with this mod commands
Next Topic: [Release] split mine limit plug-in
Goto Forum:
  


Current Time: Sun Feb 16 18:03:27 MST 2025

Total time taken to generate the page: 0.00814 seconds