Jump to content
Ibragim A

[SOLVED] (createMine issue) Magazine classname to vehicle classname

Recommended Posts

If I want to create a mine using createMine, but I only know the name of the magazine and its ammo in the inventory, then how can I get the classname of the vehicle that createMine requires?
 

In the vehicle classname config (DemoCharge_F), there is a reference to the ammo, but in the config of the ammo (DemoCharge_Remote_Ammo) there is no reference to the vehicle classname.

That is, I can get the name of the ammo from the config of the vehicle:

_vehicleClass = "DemoCharge_F";
_ammoClass = getText (configFile >> "CfgVehicles" >> _vehicleClass >> "ammo"); // "DemoCharge_Remote_Ammo"

But how to get the name of the vehicle from the config of the ammo?

I want to create a mine from the magazine in the player inventory using a script insteed of "Put Explosive" action.

Share this post


Link to post
Share on other sites

I figured out how this is done:

_magazine = "DemoCharge_Remote_Mag";
_ammo = getText (configFile >> "CfgMagazines" >> _magazine >> "ammo");
_vehicle = (("getText (_x >> 'ammo') == _ammo" configClasses (configFile >> "CfgVehicles")) apply {configName _x}) select 0;

 

Share this post


Link to post
Share on other sites
On 8/6/2024 at 1:01 AM, Ibragim A said:

I figured out how this is done:


_magazine = "DemoCharge_Remote_Mag";
_ammo = getText (configFile >> "CfgMagazines" >> _magazine >> "ammo");
_vehicle = (("getText (_x >> 'ammo') == _ammo" configClasses (configFile >> "CfgVehicles")) apply {configName _x}) select 0;

 

It is hardly possible to find a player of any game who would not want to make money from it. At the same time there are not so many options to do it: for streaming you need not only to be able to play, but also to invest money in advertising and give quality content, and the professional scene requires a very high rank and connections, so come to us and try it out https://onlyboosters.gg/

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×