Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Release Forum » [SSGM 4.0 Plugin] Vehicle Kills Command
Re: [SSGM 4.0 Plugin] Vehicle Kills Command [message #489746 is a reply to message #489745] Sun, 09 November 2014 21:15 Go to previous messageGo to previous message
Xpert is currently offline  Xpert
Messages: 1588
Registered: December 2005
Location: New York City
Karma:
General (1 Star)
roszek wrote on Sun, 09 November 2014 18:22

Fixed, Thanks. Smile



You need to fix when it counts vehicle shells, guard towers and turrets as a vehicle.


From my 4.0 source code.
void VkillsCommand::OnObjectCreate(void *data,GameObject *obj)
{
	if (obj->As_VehicleGameObj())
	{
		Attach_Script_Once(obj,"Vkills_Vehicle","");
	}
}

void Vkills_Vehicle::Killed(GameObject *obj,GameObject *killer)
{
	if (Commands->Is_A_Star(killer))
	{
		if (strstr(Commands->Get_Preset_Name(obj),"_Destroyed") || strstr(Commands->Get_Preset_Name(obj),"_destroyed") || (Get_Vehicle_Mode(obj) == VEHICLE_TYPE_TURRET))
		{
			((SoldierGameObj*)killer)->Get_Player_Data()->VehiclesDestroyed--;
		}
	}
}

ScriptRegistrant<Vkills_Vehicle> Vkills_Vehicle_Registrant("Vkills_Vehicle","");


http://i32.photobucket.com/albums/d42/XpertMaverick/xpertyankee.jpg

Creator of NetGuard, an IRC network regulator.
Developer of the CloudyServ 0.982-X project.
Developer of the CloudyServ Ren-X bot.

Part time streamer - https://twitch.tv/gg_wonder
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: [Skin] Stealth Black Hand "Venom" Retexture
Next Topic: mgagd_ag_2 Fix
Goto Forum:
  


Current Time: Sun Nov 24 17:59:08 MST 2024

Total time taken to generate the page: 0.00718 seconds