10 {
12 string seeds_type = "";
13
14 GetGame().
ConfigGetText(
"cfgVehicles " + pack_type +
" Horticulture ContainsSeedsType", seeds_type);
15
16 int seeds_quantity_max =
GetGame().
ConfigGetInt(
"cfgVehicles " + pack_type +
" Horticulture ContainsSeedsQuantity");
17 int seeds_quantity = seeds_quantity_max;
18
19 seeds_quantity = Math.Round(seeds_quantity_max * GetHealth01("",""));
20
21 if (seeds_quantity < 1)
22 {
23 seeds_quantity = 1;
24 }
25
26 if (player)
27 {
29 player.ServerReplaceItemInHandsWithNew(lambda);
30 }
31 else
32 {
36 }
37 }
eBleedingSourceType GetType()
const int ECE_PLACE_ON_SURFACE
void EmptySeedsPackLambda(EntityAI old_item, string new_item_type, PlayerBase player, int count)
proto native int ConfigGetInt(string path)
Get int value from config on path.
proto bool ConfigGetText(string path, out string value)
Get string value from config on path.
proto native Object CreateObjectEx(string type, vector pos, int iFlags, int iRotation=RF_DEFAULT)
Creates object of certain type.
proto native void ObjectDelete(Object obj)
proto native CGame GetGame()
class JsonUndergroundAreaTriggerData GetPosition