Skip to content

Commit 1f0f066

Browse files
authored
Merge branch 'master' into script-thing
2 parents cacdcaf + 8da8f88 commit 1f0f066

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

source/game_sa/Scripts/Commands/CharacterCommands.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1020,8 +1020,8 @@ auto IsCharInWater(CPed* ped) {
10201020
}
10211021

10221022
// GET_CHAR_WEAPON_IN_SLOT
1023-
auto GetCharWeaponInSlot(CPed& ped, eWeaponSlot slut) {
1024-
const auto& wep = ped.GetWeaponInSlot(slut);
1023+
auto GetCharWeaponInSlot(CPed& ped, int slot) {
1024+
const auto& wep = ped.GetWeaponInSlot(slot - 1); // 1-based slot index
10251025
return notsa::script::return_multiple(wep.m_Type, wep.m_TotalAmmo, CPickups::ModelForWeapon(wep.m_Type));
10261026
}
10271027

0 commit comments

Comments
 (0)