c++ simple commands [message #335205] |
Fri, 13 June 2008 22:07 |
HeavyX101- Left
Messages: 633 Registered: April 2008 Location: WindowsJail=ZipFolder
Karma: 0
|
Colonel |
|
|
Hey guys. It seems that i'm getting better with C++ so i wanted to make my server. Can anyone give me a simple code that lets you buy a char/veh/weapon.. Please
This account is no longer being active.
|
|
|
Re: c++ simple commands [message #335207 is a reply to message #335205] |
Sat, 14 June 2008 00:02 |
_SSnipe_
Messages: 4121 Registered: May 2007 Location: Riverside Southern Califo...
Karma: 0
|
General (4 Stars) |
|
|
all depends how you want those things delivered madrocks has a bad ass para drop weapon and tank command thta you can buy
|
|
|
|
Re: c++ simple commands [message #335260 is a reply to message #335218] |
Sat, 14 June 2008 08:47 |
HeavyX101- Left
Messages: 633 Registered: April 2008 Location: WindowsJail=ZipFolder
Karma: 0
|
Colonel |
|
|
This one is what i made to change your chars model, but it crashed the server.
class char_havoc_ChatCommand : public ChatCommandClass {
void Triggered(int ID,const TokenClass &Text,int ChatType) {
GameObject *obj = Get_GameObj(ID);
Commands->Set_Model(obj,"c_ag_havoc.w3d");
Console_Input(StrFormat("cmsg 255,255,255 [C++: ^ %d = Model Changed ^ ] ",ID).c_str());
}
};
ChatCommandRegistrant<char_havoc_ChatCommand> char_havoc_ChatCommandReg("!havoc",CHATTYPE_ALL,0,GAMEMODE_AOW);
This account is no longer being active.
|
|
|
|
|
Re: c++ simple commands [message #335471 is a reply to message #335205] |
Sun, 15 June 2008 16:28 |
|
wittebolx
Messages: 332 Registered: May 2007 Location: the netherlands
Karma: 0
|
Recruit |
|
|
class roshamboChatCommand : public ChatCommandClass {
void Triggered(int ID,const TokenClass &Text,int ChatType) {
GameObject *obj = Get_GameObj(ID);
float Credits = Commands->Get_Money(obj);
int Team = Get_Object_Type(obj);
Vector3 position;
position = Commands->Get_Position(obj);
if(!Is_Building_Dead(Find_Soldier_Factory(0)))
{
if(Credits >= 7000 && (Team == 0) ){
Commands->Give_Money(obj,-7000,false);
char message[256];
sprintf(message,"msg [WGC]: %s just transformed into a Roshambo", Get_Player_Name_By_ID(ID));
Console_Input(message);
Change_Character(obj,"Mutant_3Boss_Raveshaw");
Commands->Give_Powerup(obj,"POW_Shotgun_Player",false);
Commands->Give_Powerup(obj,"POW_Pistol_Player",false);
Commands->Give_Powerup(obj,"POW_AutoRifle_Player",false);
Commands->Give_Powerup(obj,"POW_Flamethrower_Player",false);
Commands->Give_Powerup(obj,"POW_GrenadeLauncher_Player",false);
Commands->Give_Powerup(obj,"POW_RepairGun_Player",false);
Commands->Give_Powerup(obj,"POW_Chaingun_Player",false);
Commands->Give_Powerup(obj,"POW_RocketLauncher_Player",false);
Commands->Give_Powerup(obj,"POW_ChemSprayer_Player",false);
Commands->Give_Powerup(obj,"POW_TiberiumAutoRifle_Player",false);
Commands->Give_Powerup(obj,"POW_SniperRifle_Player",false);
Commands->Give_Powerup(obj,"POW_LaserChaingun_Player",false);
Commands->Give_Powerup(obj,"POW_LaserRifle_Player",false);
Commands->Give_Powerup(obj,"POW_TiberiumFlechetteGun_Player",false);
Commands->Give_Powerup(obj,"POW_PersonalIonCannon_Player",false);
Commands->Give_Powerup(obj,"POW_Railgun_Player",false);
Commands->Give_Powerup(obj,"POW_RamjetRifle_Player",false);
Commands->Give_Powerup(obj,"POW_VoltAutoRifle_Player",false);
Commands->Give_Powerup(obj,"POW_Nuclear_Missle_Beacon",false);
Commands->Set_Position(obj,position);
}
else{
Console_Input(StrFormat("ppage %d This command works only for Nod, You need $7000, The Hand of Nod needs to be Online!.",Get_Player_ID(obj)).c_str());
}
}
}
};
ChatCommandRegistrant<roshamboChatCommand> roshamboChatCommandReg("!roshambo",CHATTYPE_TEAM,0,GAMEMODE_AOW);
if you need an Uber Character
1. Nod only.
2. Hand of Nod Required.
3. 7000 credits
http://www.wittebolx.com
|
|
|
|