Added cs_get_weapon_ammo/cs_set_weapon_ammo
This commit is contained in:
parent
bbbe0cda78
commit
180fa52acb
@ -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
|
||||
|
@ -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);
|
Loading…
Reference in New Issue
Block a user