!team2 for just admins? [message #467372] |
Tue, 15 May 2012 00:24 |
|
Distrbd21
Messages: 743 Registered: September 2008
Karma:
|
Colonel |
|
|
ok so I have it set up so only admins can use this command if there name is the same as in the code.
BUT the problem I have with that is, say a non admin joins with our name when we aren't on the server and use's the command.
What I'm asking is there away to define it more then that?
like maybe what a bot does, when it has you auth your self or login?
class team2ChatCommand : public ChatCommandClass {
void Triggered(int ID,const TokenClass &Text, int ChatType) {
std::string name = Get_Player_Name(Get_GameObj(ID));
GameObject *obj = Get_GameObj(ID);
if (name == "Distrbd21" || name == "Chevy" || name == "Darth3369")
{
if (Text[1] == "?") {
Console_Input(StrFormat("ppage %d Syntax: !team2 <player id> <team number> [usage: Teams the player to the team specified.]",ID).c_str());
}
else if (!Text[1].empty()) {
int pid = atoi(Text[1].c_str());
int team = atoi(Text[2].c_str());
Console_Input(StrFormat("team2 %d %d",pid,team).c_str());
Console_Input(StrFormat("cmsg 255,255,255 %s teamed %s to %ls",Get_Player_Name(obj), Get_Player_Name(Get_GameObj(pid)), Get_Wide_Team_Name(team)).c_str());
}
else
{
Console_Input(StrFormat("ppage %d Syntax: !team2 <player id> <team number> [usage: Teams the player to the team specified.]",ID).c_str());
Console_Input(StrFormat("ppage %d Error: Invalid parameters sent",ID).c_str());
}
}
else
{
Console_Input(StrFormat("sndp %d 00-n008e.wav",ID).c_str());
}
}
};
ChatCommandRegistrant<team2ChatCommand> team2ChatCommand_Registrant("!team2",CHATTYPE_ALL, 0, GAMEMODE_ALL);
Live Your Life Not Some one Else's.| Sharing Is Caring
Cookie Jar<glome> Who stole the cookie from the cookie jar?!
<content> glome stole the cookie from the cookie jar!
<glome> Who me?!
<content> Yes you!
<glome> Couldn't be!
<content> Then WHO?!!
<glome> Woody stole the cookie from the cookie jar!
*** glome has been kicked by DrWoody (fuck you i didn't touch the motherfucking cookie, bitch
Suicide<TB> I was depressed last night so I called the Suicide Life Line.
<TB> I reached a call center in Pakistan.
<TB> I told them I was suicidal.
<TB> They got all excited and asked if I could drive a truck
[Updated on: Tue, 15 May 2012 00:26] Report message to a moderator
|
|
|