diff --git a/dlls/cstrike/cstrike.cpp b/dlls/cstrike/cstrike.cpp index 1b90f8f9..713c88c5 100755 --- a/dlls/cstrike/cstrike.cpp +++ b/dlls/cstrike/cstrike.cpp @@ -1206,7 +1206,7 @@ static cell AMX_NATIVE_CALL cs_get_weapon_ammo(AMX *amx, cell *params) // cs_get return 0; } - return *(int *)pWeapon->pvPrivateData + OFFSET_CLIPAMMO; + return *((int *)pWeapon->pvPrivateData + OFFSET_CLIPAMMO); } static cell AMX_NATIVE_CALL cs_set_weapon_ammo(AMX *amx, cell *params) // cs_set_weapon_ammo(index, newammo); = 2 params diff --git a/plugins/include/cstrike.inc b/plugins/include/cstrike.inc index 3e3aada2..7f4a6d6d 100755 --- a/plugins/include/cstrike.inc +++ b/plugins/include/cstrike.inc @@ -115,3 +115,9 @@ native cs_get_weapon_silen(index); /* If silence = 1, weapon will be silenced, 0 and silencer will be removed. Only USP and M4A1 can be silenced. */ native cs_set_weapon_silen(index, silence = 1); + +/* Returns amount of ammo in weapon's clip. */ +native cs_get_weapon_ammo(index); + +/* Set amount of ammo in weapon's clip. */ +native cs_set_weapon_ammo(index, newammo); \ No newline at end of file