Home » Renegade Discussions » Mod Forum » Renegade API C++ help needed
() 1 Vote
Re: Renegade API C++ help needed [message #366498 is a reply to message #366284] |
Thu, 08 January 2009 11:23 |
Genesis2001
Messages: 1397 Registered: August 2006
Karma:
|
General (1 Star) |
|
|
class mapChatCommand : public ChatCommandClass {
void Triggered(int ID,const TokenClass &Text,int ChatType) {
mapnameannounce();
}
};
ChatCommandRegistrant<mapChatCommand> mapChatCommandReg("!nextmap",CHATTYPE_ALL,0,GAMEMODE_ALL);
class map2ChatCommand : public ChatCommandClass {
void Triggered(int ID,const TokenClass &Text,int ChatType) {
mapnameannounce();
}
};
ChatCommandRegistrant<map2ChatCommand> map2ChatCommandReg("!next",CHATTYPE_ALL,0,GAMEMODE_ALL);
class map3ChatCommand : public ChatCommandClass {
void Triggered(int ID,const TokenClass &Text,int ChatType) {
mapnameannounce();
}
};
ChatCommandRegistrant<map3ChatCommand> map3ChatCommandReg("!n",CHATTYPE_ALL,0,GAMEMODE_ALL);
class map4ChatCommand : public ChatCommandClass {
void Triggered(int ID,const TokenClass &Text,int ChatType) {
mapnameannounce();
}
};
ChatCommandRegistrant<map4ChatCommand> map4ChatCommandReg("!N",CHATTYPE_ALL,0,GAMEMODE_ALL);
class map5ChatCommand : public ChatCommandClass {
void Triggered(int ID,const TokenClass &Text,int ChatType) {
mapnameannounce();
}
};
ChatCommandRegistrant<map5ChatCommand> map5ChatCommandReg("!NEXT",CHATTYPE_ALL,0,GAMEMODE_ALL);
class map6ChatCommand : public ChatCommandClass {
void Triggered(int ID,const TokenClass &Text,int ChatType) {
mapnameannounce();
}
};
ChatCommandRegistrant<map6ChatCommand> map6ChatCommandReg("!NEXTMAP",CHATTYPE_ALL,0,GAMEMODE_ALL);
class map7ChatCommand : public ChatCommandClass {
void Triggered(int ID,const TokenClass &Text,int ChatType) {
mapnameannounce();
}
};
ChatCommandRegistrant<map7ChatCommand> map7ChatCommandReg("!Nextmap",CHATTYPE_ALL,0,GAMEMODE_ALL);
class map8ChatCommand : public ChatCommandClass {
void Triggered(int ID,const TokenClass &Text,int ChatType) {
mapnameannounce();
}
};
ChatCommandRegistrant<map8ChatCommand> map8ChatCommandReg("!Next",CHATTYPE_ALL,0,GAMEMODE_ALL);
You can combine all those into one if I recall correctly.. :/
ChatCommandRegistrant<mapChatCommand> mapChatCommandReg("!cmd1;!cmd2;!cmd3;!cmd4;etc",CHATTYPE_ALL,0,GAMEMODE_ALL);
EDIT: I think this "srand(time(NULL));" is supposed to be called only once? :/
Also, I usually call it like: "srand((unsigned int)time(0));"
[Updated on: Thu, 08 January 2009 11:30] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Sun Dec 22 21:36:32 MST 2024
Total time taken to generate the page: 0.00715 seconds
|