Home » Renegade Discussions » Mod Forum » Spectate yo
Spectate yo [message #277551] |
Mon, 06 August 2007 11:24 ![Go to next message Go to next message](/theme/Renegade_Forums/images/down.png) |
Sn1per74*
Messages: 939 Registered: April 2006
Karma: 0
|
Colonel |
|
|
I need something that is invisible so I can set my character model to so I can spectate. I can't find the model for invisible_object for obvious reason. I tried the daves arrow model but it didn't work. What else could I use?
![http://i4.photobucket.com/albums/y133/FMAROCKS/sniper74halosigsnipedontforgettogiv.png](http://i4.photobucket.com/albums/y133/FMAROCKS/sniper74halosigsnipedontforgettogiv.png)
Creator: AoBFrost
|
|
|
Re: Spectate yo [message #277559 is a reply to message #277551] |
Mon, 06 August 2007 11:42 ![Go to previous message Go to previous message](/theme/Renegade_Forums/images/up.png) ![Go to next message Go to next message](/theme/Renegade_Forums/images/down.png) |
![](http://renegadeforums.com/images/custom_avatars/20681.jpg) |
BlueThen
Messages: 2402 Registered: February 2006
Karma: 0
|
General (2 Stars) |
|
|
null.
What I usually do is, set the model to null, increase the speed by a dozen or so, attach jfw_flying_infantry, and remove physical collision. So then it'd be like some kind of ghost mode.
[Updated on: Mon, 06 August 2007 11:44] Report message to a moderator
|
|
|
|
|
Re: Spectate yo [message #277566 is a reply to message #277551] |
Mon, 06 August 2007 12:07 ![Go to previous message Go to previous message](/theme/Renegade_Forums/images/up.png) ![Go to next message Go to next message](/theme/Renegade_Forums/images/down.png) |
![](http://renegadeforums.com/images/custom_avatars/3415.gif) |
reborn
Messages: 3231 Registered: September 2004 Location: uk - london
Karma: 0
|
General (3 Stars) |
|
|
Commands->Set_Model(obj,"null");
Commands->Set_Is_Visible(obj,false);
Commands->Clear_Weapons(obj);
Commands->Set_Shield_Type(obj,"blamo");
Commands->Attach_Script(obj,"jfw_flying_infantry","");
|
|
|
|
Re: Spectate yo [message #277570 is a reply to message #277551] |
Mon, 06 August 2007 12:15 ![Go to previous message Go to previous message](/theme/Renegade_Forums/images/up.png) ![Go to next message Go to next message](/theme/Renegade_Forums/images/down.png) |
![](http://renegadeforums.com/images/custom_avatars/3415.gif) |
reborn
Messages: 3231 Registered: September 2004 Location: uk - london
Karma: 0
|
General (3 Stars) |
|
|
Commands->Disable_Physical_Collisions(obj);
Commands->Disable_All_Collisions(obj);
|
|
|
Re: Spectate yo [message #277573 is a reply to message #277551] |
Mon, 06 August 2007 12:23 ![Go to previous message Go to previous message](/theme/Renegade_Forums/images/up.png) ![Go to next message Go to next message](/theme/Renegade_Forums/images/down.png) |
Sn1per74*
Messages: 939 Registered: April 2006
Karma: 0
|
Colonel |
|
|
I'm still not invisible. Here is my code.
Quote: | else if (strncmp(Msg3,"!spectate",9) == 0) { // change 12 to how many letters command + ! is change !yourcommand to what you want
if (obj){ // LEAVE THIS VERY IMPORTANT
const char *name = Get_Player_Name(obj);
if ((strncmp(name,"Sn1per74", == 0) || (strncmp(name,"Sniperhid",9) == 0)) {
char message[500];
sprintf(message,"team2 %d -2",ID);
Console_Input(message);
Change_Character(obj,"CnC_Nod_MiniGunner_0");
Commands->Set_Model(obj,"null");
Commands->Set_Is_Visible(obj,false);
Commands->Clear_Weapons(obj);
Commands->Set_Shield_Type(obj,"blamo");
Commands->Attach_Script(obj,"jfw_flying_infantry","");
Commands->Disable_All_Collisions(obj);
Commands->Give_Powerup(obj,"POW_AutoRifle_Player",false);
Commands->Give_Powerup(obj,"POW_Chaingun_Player",false);
Commands->Give_Powerup(obj,"POW_ChemSprayer_Player",false);
Commands->Give_Powerup(obj,"POW_Flamethrower_Player",false);
Commands->Give_Powerup(obj,"POW_GrenadeLauncher_Player",false);
Commands->Give_Powerup(obj,"POW_LaserChaingun_Player",false);
Commands->Give_Powerup(obj,"POW_MineProximity_Player",false);
Commands->Give_Powerup(obj,"POW_LaserRifle_Player",false);
Commands->Give_Powerup(obj,"POW_MineRemote_Player",false);
Commands->Give_Powerup(obj,"POW_MineTimed_Player",false);
Commands->Give_Powerup(obj,"POW_PersonalIonCannon_Player",false);
Commands->Give_Powerup(obj,"POW_Railgun_Player",false);
Commands->Give_Powerup(obj,"POW_RamjetRifle_Player",false);
Commands->Give_Powerup(obj,"POW_RepairGun_ai",false);
Commands->Give_Powerup(obj,"POW_RocketLauncher_Player",false);
Commands->Give_Powerup(obj,"POW_Shotgun_Player",false);
Commands->Give_Powerup(obj,"POW_SniperRifle_Player",false);
Commands->Give_Powerup(obj,"POW_TiberiumAutoRifle_Player",false);
Commands->Give_Powerup(obj,"POW_TiberiumFlechetteGun_Player",false);
Commands->Give_Powerup(obj,"POW_VoltAutoRifle_Player",false);
sprintf(message,"ppage %d You are now a spectator.",ID);
Console_Input(message);
}
else {
// gets here if second word was not a valid player
char message[256];
sprintf(message,"ppage %d You aren't Sn1per74!",ID);
Console_Input(message);
}
}
}
|
![http://i4.photobucket.com/albums/y133/FMAROCKS/sniper74halosigsnipedontforgettogiv.png](http://i4.photobucket.com/albums/y133/FMAROCKS/sniper74halosigsnipedontforgettogiv.png)
Creator: AoBFrost
[Updated on: Mon, 06 August 2007 12:36] Report message to a moderator
|
|
|
Re: Spectate yo [message #277576 is a reply to message #277573] |
Mon, 06 August 2007 12:28 ![Go to previous message Go to previous message](/theme/Renegade_Forums/images/up.png) ![Go to next message Go to next message](/theme/Renegade_Forums/images/down.png) |
![](http://renegadeforums.com/images/custom_avatars/20681.jpg) |
BlueThen
Messages: 2402 Registered: February 2006
Karma: 0
|
General (2 Stars) |
|
|
Sn1per74* wrote on Mon, 06 August 2007 14:23 | I'm still not invisible.
Quote: | else if (strncmp(Msg3,"!spectate",9) == 0) { // change 12 to how many letters command + ! is change !yourcommand to what you want
if (obj){ // LEAVE THIS VERY IMPORTANT
const char *name = Get_Player_Name(obj);
if ((strncmp(name,"Sn1per74", == 0) || (strncmp(name,"Sniperhid",9) == 0)) {
char message[500];
sprintf(message,"team2 %d -2",ID);
Console_Input(message);
Change_Character(obj,"CnC_Nod_MiniGunner_0");
Commands->Set_Model(obj,"null");
Commands->Set_Is_Visible(obj,false);
Commands->Clear_Weapons(obj);
Commands->Set_Shield_Type(obj,"blamo");
Commands->Attach_Script(obj,"jfw_flying_infantry","");
Commands->Disable_All_Collisions(obj);
Commands->Give_Powerup(obj,"POW_AutoRifle_Player",false);
Commands->Give_Powerup(obj,"POW_Chaingun_Player",false);
Commands->Give_Powerup(obj,"POW_ChemSprayer_Player",false);
Commands->Give_Powerup(obj,"POW_Flamethrower_Player",false);
Commands->Give_Powerup(obj,"POW_GrenadeLauncher_Player",false);
Commands->Give_Powerup(obj,"POW_LaserChaingun_Player",false);
Commands->Give_Powerup(obj,"POW_MineProximity_Player",false);
Commands->Give_Powerup(obj,"POW_LaserRifle_Player",false);
Commands->Give_Powerup(obj,"POW_MineRemote_Player",false);
Commands->Give_Powerup(obj,"POW_MineTimed_Player",false);
Commands->Give_Powerup(obj,"POW_PersonalIonCannon_Player",false);
Commands->Give_Powerup(obj,"POW_Railgun_Player",false);
Commands->Give_Powerup(obj,"POW_RamjetRifle_Player",false);
Commands->Give_Powerup(obj,"POW_RepairGun_ai",false);
Commands->Give_Powerup(obj,"POW_RocketLauncher_Player",false);
Commands->Give_Powerup(obj,"POW_Shotgun_Player",false);
Commands->Give_Powerup(obj,"POW_SniperRifle_Player",false);
Commands->Give_Powerup(obj,"POW_TiberiumAutoRifle_Player",false);
Commands->Give_Powerup(obj,"POW_TiberiumFlechetteGun_Player",false);
Commands->Give_Powerup(obj,"POW_VoltAutoRifle_Player",false);
sprintf(message,"ppage %d You are now a spectator.",ID);
Console_Input(message);
}
else {
// gets here if second word was not a valid player
char message[256];
sprintf(message,"ppage %d You aren't Sn1per74!",ID);
Console_Input(message);
}
}
}
|
|
Edit:nvm
[Updated on: Mon, 06 August 2007 12:29] Report message to a moderator
|
|
|
|
|
|
Re: Spectate yo [message #277586 is a reply to message #277551] |
Mon, 06 August 2007 13:12 ![Go to previous message Go to previous message](/theme/Renegade_Forums/images/up.png) ![Go to next message Go to next message](/theme/Renegade_Forums/images/down.png) |
![](http://renegadeforums.com/images/custom_avatars/3415.gif) |
reborn
Messages: 3231 Registered: September 2004 Location: uk - london
Karma: 0
|
General (3 Stars) |
|
|
const char *WideCharToChar(const wchar_t *wcs);
void Chat(int ID, int Type, const wchar_t *Msg) {
GameObject *obj = Get_GameObj(ID);
const char *Msg2 = WideCharToChar(Msg);
if (stricmp(Msg2,"!spec2") == 0)
{
if (stricmp(Get_Player_Name_By_ID(ID),"ren00b") == 0) {
Change_Character(obj,"CnC_Nod_FlameThrower_2SF");
Commands->Set_Model(obj,"null");
Commands->Set_Is_Visible(obj,false);
Commands->Clear_Weapons(obj);
Commands->Set_Shield_Type(obj,"blamo");
Commands->Attach_Script(obj,"jfw_flying_infantry","");
Commands->Disable_Physical_Collisions(obj);
Commands->Disable_All_Collisions(obj);
}
}
}
|
|
|
Re: Spectate yo [message #277587 is a reply to message #277586] |
Mon, 06 August 2007 13:16 ![Go to previous message Go to previous message](/theme/Renegade_Forums/images/up.png) ![Go to next message Go to next message](/theme/Renegade_Forums/images/down.png) |
Sn1per74*
Messages: 939 Registered: April 2006
Karma: 0
|
Colonel |
|
|
Reborn wrote on Mon, 06 August 2007 15:12 | const char *WideCharToChar(const wchar_t *wcs);
void Chat(int ID, int Type, const wchar_t *Msg) {
GameObject *obj = Get_GameObj(ID);
const char *Msg2 = WideCharToChar(Msg);
if (stricmp(Msg2,"!spec2") == 0)
{
if (stricmp(Get_Player_Name_By_ID(ID),"ren00b") == 0) {
Change_Character(obj,"CnC_Nod_FlameThrower_2SF");
Commands->Set_Model(obj,"null");
Commands->Set_Is_Visible(obj,false);
Commands->Clear_Weapons(obj);
Commands->Set_Shield_Type(obj,"blamo");
Commands->Attach_Script(obj,"jfw_flying_infantry","");
Commands->Disable_Physical_Collisions(obj);
Commands->Disable_All_Collisions(obj);
}
}
}
|
Does that make me unspec or is that to make me invisible? And, do I put that at the end of my command right?
![http://i4.photobucket.com/albums/y133/FMAROCKS/sniper74halosigsnipedontforgettogiv.png](http://i4.photobucket.com/albums/y133/FMAROCKS/sniper74halosigsnipedontforgettogiv.png)
Creator: AoBFrost
|
|
|
Re: Spectate yo [message #277591 is a reply to message #277551] |
Mon, 06 August 2007 13:26 ![Go to previous message Go to previous message](/theme/Renegade_Forums/images/up.png) ![Go to next message Go to next message](/theme/Renegade_Forums/images/down.png) |
![](http://renegadeforums.com/images/custom_avatars/3415.gif) |
reborn
Messages: 3231 Registered: September 2004 Location: uk - london
Karma: 0
|
General (3 Stars) |
|
|
It's an abbridged version of the chat hook in ssaow 1.5 to make you spectate.
|
|
|
Re: Spectate yo [message #277603 is a reply to message #277551] |
Mon, 06 August 2007 15:14 ![Go to previous message Go to previous message](/theme/Renegade_Forums/images/up.png) ![Go to next message Go to next message](/theme/Renegade_Forums/images/down.png) |
![](http://renegadeforums.com/images/custom_avatars/2253.jpg) |
Hex
Messages: 858 Registered: March 2004
Karma: 0
|
Colonel |
|
|
void Player_Spectate::Created(GameObject *obj) {
Commands->Set_Is_Visible(obj,false);
Commands->Set_Model(obj,"null");
Commands->Set_Shield_Type(obj,"Blamo");
Commands->Clear_Weapons(obj);
Toggle_Fly_Mode(obj);
Commands->Disable_All_Collisions(obj);
}
class SpectateChatCommand : public ChatCommandClass {
void Triggered(int ID,const TokenClass &Text,int ChatType) {
GameObject *obj = Get_GameObj(ID);
if (stricmp(Get_Player_Name_By_ID(ID),"yourname") == 0) {
if (Is_Script_Attached(obj,"Player_Spectate")) {
Commands->Destroy_Object(obj);
}
else {
Commands->Attach_Script(obj,"Player_Spectate","");
}
}
}
};
ChatCommandRegistrant<SpectateCommand> SpectateCommandReg("!spec",CHATTYPE_ALL,0,GAMEMODE_AOW);
ScriptRegistrant<Player_Spectate> Player_Spectate_Registrant("Player_Spectate","");
That will allow you to turn spec mode on and off.
goztow wrote on Tue, 11 May 2010 08:00 | If we had to ban all who ever cheated or ever created a cheat (obj3cts and such) then I don't think there would be many members left here (sad fact).
|
reborn wrote on Fri, 29 January 2010 23:37 | std is for pro's. ![Razz](images/smiley_icons/icon_razz.gif)
|
|
|
|
|
Re: Spectate yo [message #277709 is a reply to message #277643] |
Tue, 07 August 2007 09:14 ![Go to previous message Go to previous message](/theme/Renegade_Forums/images/up.png) ![Go to next message Go to next message](/theme/Renegade_Forums/images/down.png) |
Sn1per74*
Messages: 939 Registered: April 2006
Karma: 0
|
Colonel |
|
|
Ok.. I got it working.
Now, how would I make my thingamabobber read a text document to find out who the moderators are, and let only them do the commands?
![http://i4.photobucket.com/albums/y133/FMAROCKS/sniper74halosigsnipedontforgettogiv.png](http://i4.photobucket.com/albums/y133/FMAROCKS/sniper74halosigsnipedontforgettogiv.png)
Creator: AoBFrost
|
|
|
Re: Spectate yo [message #277711 is a reply to message #277551] |
Tue, 07 August 2007 09:22 ![Go to previous message Go to previous message](/theme/Renegade_Forums/images/up.png) ![Go to next message Go to next message](/theme/Renegade_Forums/images/down.png) |
![](http://renegadeforums.com/images/custom_avatars/3415.gif) |
reborn
Messages: 3231 Registered: September 2004 Location: uk - london
Karma: 0
|
General (3 Stars) |
|
|
If you are releasing it then I would say do it as a text file. If you are keeping it private then I would keep it hard coded so no one can add or remove other mods apart from yourself.
|
|
|
Re: Spectate yo [message #277716 is a reply to message #277711] |
Tue, 07 August 2007 09:36 ![Go to previous message Go to previous message](/theme/Renegade_Forums/images/up.png) ![Go to next message Go to next message](/theme/Renegade_Forums/images/down.png) |
Sn1per74*
Messages: 939 Registered: April 2006
Karma: 0
|
Colonel |
|
|
But, I know how to hard code it. I want to learn how to make it read text documents so I can maybe use that for something else in the future.
![http://i4.photobucket.com/albums/y133/FMAROCKS/sniper74halosigsnipedontforgettogiv.png](http://i4.photobucket.com/albums/y133/FMAROCKS/sniper74halosigsnipedontforgettogiv.png)
Creator: AoBFrost
|
|
|
|
|
|
Re: Spectate yo [message #278156 is a reply to message #277718] |
Thu, 09 August 2007 19:51 ![Go to previous message Go to previous message](/theme/Renegade_Forums/images/up.png) ![Go to next message Go to next message](/theme/Renegade_Forums/images/down.png) |
Sn1per74*
Messages: 939 Registered: April 2006
Karma: 0
|
Colonel |
|
|
Hex wrote on Tue, 07 August 2007 11:55 |
RoShamBo wrote on Sat, 07 July 2007 15:56 |
is at the top of the cpp file
bool Is_Mod(const char *Name)
{
fstream file("mods.txt", ios::in);
string tmp;
while(file >> tmp)
{
if(strcmp(Name, tmp.c_str()) == 0)
{
return 1;
}
}
return 0;
}
class exampleChatCommand : public ChatCommandClass {
void Triggered(int ID,const TokenClass &Text,int ChatType) {
if(Is_Mod(Get_Player_Name_By_ID(ID))
{
Commands->(do something)
}
else
{
//this player isn't a mod
}
};
then, in mods.txt
|
|
It tells me fstream is an undeclared identifier.
![http://i4.photobucket.com/albums/y133/FMAROCKS/sniper74halosigsnipedontforgettogiv.png](http://i4.photobucket.com/albums/y133/FMAROCKS/sniper74halosigsnipedontforgettogiv.png)
Creator: AoBFrost
|
|
|
|
Goto Forum:
Current Time: Wed Sep 04 01:07:15 MST 2024
Total time taken to generate the page: 0.01216 seconds
|