diff --git a/saco/game/game.cpp b/saco/game/game.cpp index 035e3c0..b76cb79 100644 --- a/saco/game/game.cpp +++ b/saco/game/game.cpp @@ -833,6 +833,22 @@ const PCHAR CGame::GetWeaponName(int iWeaponID) //----------------------------------------------------------- +DWORD CGame::CreateWeaponPickup(int iModel, DWORD dwAmmo, float fX, float fY, float fZ) +{ + DWORD hnd; + + if(!IsModelLoaded(iModel)) { + RequestModel(iModel); + LoadRequestedModels(); + while(!IsModelLoaded(iModel)) Sleep(5); + } + + ScriptCommand(&create_pickup_with_ammo, iModel, 4, dwAmmo, fX, fY, fZ, &hnd); + return hnd; +} + +//----------------------------------------------------------- + DWORD CGame::GetD3DDevice() { DWORD pdwD3DDev=0; diff --git a/saco/game/game.h b/saco/game/game.h index 3f58944..7432787 100644 --- a/saco/game/game.h +++ b/saco/game/game.h @@ -101,6 +101,8 @@ public: const PCHAR GetWeaponName(int iWeaponID); + DWORD CreateWeaponPickup(int iModel, DWORD dwAmmo, float fX, float fY, float fZ); + int GetScreenWidth() { return *(int*)0xC17044; }; int GetScreenHeight() { return *(int*)0xC17048; }; diff --git a/saco/game/scripting.h b/saco/game/scripting.h index 6a52998..6cd2eff 100644 --- a/saco/game/scripting.h +++ b/saco/game/scripting.h @@ -82,6 +82,8 @@ const SCRIPT_COMMAND set_actor_money = { 0x03fe, "ii" }; const SCRIPT_COMMAND text_clear_all = { 0x00be, "" }; +const SCRIPT_COMMAND create_pickup_with_ammo = { 0x032b, "iiifffv" }; + const SCRIPT_COMMAND create_radar_marker_icon = { 0x0570, "fffiv" }; const SCRIPT_COMMAND remove_panel = { 0x08DA, "i" };