Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » Purchase Vehicles
Re: Purchase Vehicles [message #318052 is a reply to message #317947] Tue, 19 February 2008 18:29 Go to previous messageGo to previous message
wittebolx is currently offline  wittebolx
Messages: 332
Registered: May 2007
Location: the netherlands
Karma:
Recruit
this will drop a recon bike like when you get a vehicle crate:
also add the cost and made it so it only works of the airstrip is online.

gmmain.cpp
class reconChatCommand : public ChatCommandClass {
	void Triggered(int ID,const TokenClass &Text,int ChatType) {
		GameObject *obj = Get_GameObj(ID);
		float Credits = Commands->Get_Money(obj);
if(!Is_Building_Dead(Find_Airstrip(0)))
{
if(Credits >= 300){
		Commands->Give_Money(obj,-300,false);
		Commands->Attach_Script(obj,"reb_reconVehicle_reinforcements","");
	}
else {
	Console_Input(StrFormat("ppage %d [WGC] You need $300 to use this command, Your AirStrip needs to be Online!.",Get_Player_ID(obj)).c_str());
}
}
	}
};
ChatCommandRegistrant<reconChatCommand> reconChatCommandReg("!recon",CHATTYPE_TEAM,0,GAMEMODE_AOW);

/////////////////////////
//////////recon//////////
//Vehicle Reinforcements/
/////////////////////////
/////////////////////////

void reb_reconVehicle_reinforcements::Created(GameObject *obj) {

Vector3 position = Commands->Get_Position(obj);
GameObject *flare = Commands->Create_Object("Signal_Flares",position);
flareID = Commands->Get_ID(flare);
Commands->Attach_Script(flare,"JFW_Disable_Physical_Collision","");

Commands->Create_2D_WAV_Sound("m00gnod_secx0007r3nors_snd.wav");
Console_Input("msg a Nod Vehicle is Ordered!");
Console_Input(StrFormat("ppage %d [Mission Controll at WGC] You have called in a Nod Vehicle, Your Vehicle will be arriving at your position soon.",Get_Player_ID(obj)).c_str());

Commands->Start_Timer(obj,this,3.0f,1);
Commands->Start_Timer(obj,this,6.0f,2);
Commands->Start_Timer(obj,this,9.0f,3);

}

void reb_reconVehicle_reinforcements::Timer_Expired(GameObject *obj, int number) {

GameObject *flare = Commands->Find_Object(flareID);

if(number == 1){

		Commands->Create_2D_WAV_Sound("m00gnod_kill0030a2nsmg_snd.wav");
		Commands->Attach_Script(flare,"Test_Cinematic","reconVehicle_Paratroopers.txt");
	}
if(number == 2){

	Console_Input("msg a Nod Vehicle is arriving!");	
	}
if(number == 3){

		Commands->Create_2D_WAV_Sound("m00evag_dsgn0006i1evag_snd.wav");
	}
}


ScriptRegistrant<reb_reconVehicle_reinforcements> reb_reconVehicle_reinforcements_Registrant("reb_reconVehicle_reinforcements","");


gmmain.h
class reb_reconVehicle_reinforcements : public ScriptImpClass {
	void Created(GameObject *obj);
	void Timer_Expired(GameObject *obj,int number);
	int flareID;
};


and the txt file for in your data folder.
reconVehicle_Paratroopers.txt
;************************* Transport Helicopter Hummvee Drop  ************************

; ****************************** Trajectory Transport

-1	Create_Object,		1, "XG_TransprtBone",			0, 0, 0, 0
-1	Play_Animation,		1, "XG_TransprtBone.XG_HD_TTraj", 1

; ****************************** Transport

-1	Create_Real_Object,	2, "CnC_GDI_Transport", 1, "BN_Trajectory"
-1	Attach_Script,		2, "KAK_Prevent_Destruction_Until_Entered"
-1	Set_Primary,		2
-1	Attach_to_Bone,		2, 1, "BN_Trajectory"
-1	Play_Animation,		2, "v_GDI_trnspt.XG_HD_Transport",1
-700	destroy_object,		2

; ****************************** Trajectory Nod_Light_Tank

-1	Create_Object,		3, "XG_HD_HTraj",			0, 0, 0, 0
-1	Play_Animation,		3, "XG_HD_HTraj.XG_HD_HTraj", 1

; ****************************** Nod_Light_Tank

-1	Create_Real_Object,	4, "Nod_Recon_Bike_Player", 3, "BN_Trajectory" 
-1	Attach_Script,		4, "M02_Player_Vehicle", "0"
-1	Attach_Script,		4, "KAK_Prevent_Destruction_Until_Entered"
-1	Attach_to_Bone,		4, 3, "BN_Trajectory"
-437	Attach_to_Bone,		4, -1, "BN_Trajectory"
-437	Move_Slot,		7, 4

; ****************************** Harness

-1	Create_Object,		6, "XG_HD_Harness",			0, 0, 0, 0
-1	Play_Animation,		6, "XG_HD_Harness.XG_HD_Harness", 0

; ****************************** Primary Destroyed

1000000 Destroy_Object, 1
1000000 Destroy_Object, 2
1000000 Destroy_Object, 3
1000000 Destroy_Object, 4
1000000 Destroy_Object, 5
1000000 Destroy_Object, 6


thats all Wink
have fun


 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: CnC Reborn isn't Duke Nukem Forever...
Next Topic: Harvester controllers
Goto Forum:
  


Current Time: Wed Dec 04 20:27:56 MST 2024

Total time taken to generate the page: 0.00918 seconds