Re: Another SSGM Question [message #271881 is a reply to message #271871] |
Mon, 09 July 2007 02:11   |
 |
Whitedragon
Messages: 832 Registered: February 2003 Location: California
Karma:
|
Colonel |
|
|
I just showed you how to have multiple files, admins.txt, mods.txt, etc., and use the same Is_Mod for all of them.
Quote: |
You could make Is_Mod work for any text file:
bool Is_Mod(const char *File, const char *Name) {
fstream file(File, ios::in);
string tmp;
while(file >> tmp) {
if(strcmp(Name, tmp.c_str()) == 0) {
return true;
}
}
return false;
}
|
So
if (Is_Mod("admins.txt",Get_Player_Name_By_ID(ID))) {
The 0/1 has nothing to do with that.
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 - )
|
|
|