Skip to content

Instantly share code, notes, and snippets.

@jameslkingsley
Created January 30, 2016 14:24
Show Gist options
  • Save jameslkingsley/7bdf17b81bd6565f49be to your computer and use it in GitHub Desktop.
Save jameslkingsley/7bdf17b81bd6565f49be to your computer and use it in GitHub Desktop.
void add_weapon_item(const object& obj_, const std::string& weapon_name_, const std::string& item_name_);
void add_weapon_item(const object& obj_, const std::string& weapon_name_, const std::string& item_name_, int ammo_count_);
void add_weapon_item(const object& obj_, const std::string& weapon_name_, const std::string& item_name_, int ammo_count_, const std::string& muzzle_name_);
///////////////////////////////////////////////////////////////////////
void add_weapon_item(const object& obj_, const std::string& weapon_name_, const std::string& item_name_) {
game_value params({
weapon_name_,
item_name_
});
host::functions.invoke_raw_binary(client::__sqf::binary__addweaponitem__object__array__ret__nothing, obj_, params);
}
void add_weapon_item(const object& obj_, const std::string& weapon_name_, const std::string& item_name_, int ammo_count_) {
game_value params({
weapon_name_,
game_value({
item_name_,
ammo_count_
})
});
host::functions.invoke_raw_binary(client::__sqf::binary__addweaponitem__object__array__ret__nothing, obj_, params);
}
void add_weapon_item(const object& obj_, const std::string& weapon_name_, const std::string& item_name_, int ammo_count_, const std::string& muzzle_name_) {
game_value params({
weapon_name_,
game_value({
item_name_,
ammo_count_,
muzzle_name_
})
});
host::functions.invoke_raw_binary(client::__sqf::binary__addweaponitem__object__array__ret__nothing, obj_, params);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment