Ok, this is what i did now:
class jailChatCommand : public ChatCommandClass {
void Triggered(int ID,const TokenClass &Text,int ChatType) {
if (!Text[1].empty() ) {
const char *pris = Get_Player_Name(Get_Part_Name(Text[1].c_str()));
GameObject *obj = Get_GameObj(pris);
int x = 100054;
GameObject *gotoObject = Commands->Find_Object(x);
Vector3 gotoLocation = Commands->Get_Position(gotoObject);
Commands->Set_Position(obj,gotoLocation);
Change_Character(obj,"GDI_Prisoner_v0a");
Commands->Set_Shield_Type(obj,"Blamo");
Console_Input(StrFormat("cmsg 166,149,56 [BSS: %d Has Been Arrested ]", Get_Player_ID(Get_Part_Name(Text[1].c_str()))).c_str());
}
else {
Console_Input(StrFormat("ppage %d ERROR!",ID).c_str());
}
}
};
ChatCommandRegistrant<jailChatCommand> jailChatCommandReg("!jail;!j",CHATTYPE_ALL,1,GAMEMODE_AOW);
I get this error:
Quote: |
Error 1 error C2664: 'Get_GameObj' : cannot convert parameter 1 from 'const char *' to 'int' c:\Westwood\RenegadeFDS\Server\gmmain.cpp 3222
|