Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Release Forum » [script]random map rotation code && !setnextmap  () 2 Votes
Re: random map rotation code && !setnextmap [message #344405 is a reply to message #344397] Fri, 01 August 2008 15:26 Go to previous messageGo to previous message
wittebolx is currently offline  wittebolx
Messages: 332
Registered: May 2007
Location: the netherlands
Karma:
Recruit
reborn wrote on Fri, 01 August 2008 23:46


Oh, and the ismod function is here:

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;
}


You just need a a mods.txt file in your servers directory with player names of people you want to be a mod in it.


Many thanks to roshambo for his pretty neat for loop to count maps, awesome dude! Really helped a million Very Happy


first of all Great Work on the Script!!
second, the mods.txt will give much problems since it only detects the player name and since we have many nick spoofers that could be a problem...

im not here to judge but people must now this could be a problem.
anyway the code is very helpfull in creating a new Bot Wink


 
Read Message
Read Message
Read Message
Read Message
Previous Topic: BloodMod
Next Topic: Coop Beta 2.50
Goto Forum:
  


Current Time: Wed Feb 12 17:55:08 MST 2025

Total time taken to generate the page: 0.00652 seconds