Cool, but try this...
class e_onChatCommand : public ChatCommandClass {
void Triggered(int ID,const TokenClass &Text,int ChatType) {
if(Get_Vehicle(Get_GameObj(ID))){
Commands->Enable_Engine(Get_Vehicle(Get_GameObj(ID)),1);
Console_Input(StrFormat("cmsg 166,149,56 [BSS: Engine is on!] ").c_str());
}
else{
Console_Input(StrFormat("ppage %d You must be driving a vehicle to use this command.",ID).c_str());
}
}
};
ChatCommandRegistrant<e_onChatCommand> e_onChatCommandReg("!engine_on",CHATTYPE_ALL,0,GAMEMODE_AOW);
You might also consider setting a boolean so you can use the same command to turn it on/off.
[Updated on: Wed, 18 June 2008 21:45]
Report message to a moderator