Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » Spectate yo
Re: Spectate yo [message #278156 is a reply to message #277718] Thu, 09 August 2007 19:51 Go to previous messageGo to previous message
Sn1per74* is currently offline  Sn1per74*
Messages: 939
Registered: April 2006
Karma:
Colonel
Hex wrote on Tue, 07 August 2007 11:55

RoShamBo wrote on Sat, 07 July 2007 15:56



#include <fstream>

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
<nick1>
<nick2>
<nick3>




It tells me fstream is an undeclared identifier.


http://i4.photobucket.com/albums/y133/FMAROCKS/sniper74halosigsnipedontforgettogiv.png
Creator: AoBFrost
 
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
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: need name of dds file
Next Topic: 3 new guns
Goto Forum:
  


Current Time: Sun Nov 10 17:43:44 MST 2024

Total time taken to generate the page: 0.01092 seconds