Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » could anyone help me with this mod commands
could anyone help me with this mod commands [message #336131] Fri, 20 June 2008 05:42 Go to previous message
cpjok is currently offline  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);
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: anyone know were i can get vetran plugin for level promotes on my server
Next Topic: Having problems with C++
Goto Forum:
  


Current Time: Sun Feb 16 17:57:38 MST 2025

Total time taken to generate the page: 0.00799 seconds