could anyone help me with this mod commands [message #336131] |
Fri, 20 June 2008 05:42 ![Go to next message Go to previous message](/theme/Renegade_Forums/images/down.png) |
![](http://renegadeforums.com/images/custom_avatars/23242.gif) |
cpjok
Messages: 425 Registered: September 2007
Karma:
|
Commander |
|
|
ok it works but theres some problems
when they have got anoth to buy it they can buy it and it takes there creds but
if they dont have enougth to buy it but use the command it gives them the item and dosent charge them
Quote: | class RailChatCommand : public ChatCommandClass {
void Triggered(int ID,const TokenClass &Text,int ChatType) {
GameObject *obj = Get_GameObj(ID);
char message[256];
Console_Input(StrFormat("cmsg 166,149,56 [BZ-BOT]: Someone Bought A Railgun",ID).c_str());
Console_Input(message);
Commands->Give_Powerup(obj,"POW_Railgun_Player",false);
float Credits = Commands->Get_Money(obj);
if(Credits >= 600 ){
Commands->Give_Money(obj,-600,false);
}
else{
Console_Input(StrFormat("ppage %d Rail Cost 600 ",Get_Player_ID(obj)).c_str());
}
}
};
ChatCommandRegistrant<RailChatCommand> RailChatCommandReg("!rail",CHATTYPE_ALL,0,GAMEMODE_AOW);
|
|
|
|