Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated return logic in rg_remove_items_by_slot #285

Closed
wants to merge 1 commit into from
Closed

Updated return logic in rg_remove_items_by_slot #285

wants to merge 1 commit into from

Conversation

Javekson
Copy link
Contributor

@Javekson Javekson commented Sep 12, 2023

  • Updated return logic in rg_remove_items_by_slot
  • Updated removal logic for 'weapon_c4' slot considering 'arg_remammo' argument

if (pPlayer->RemovePlayerItem(pItem)) {
removed = pPlayer->RemovePlayerItem(pItem) ? true : false;

if (removed) {
Copy link
Contributor

@justgo97 justgo97 Sep 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can also just keep it the old way and mark removed as true when condition is met

if (pPlayer->RemovePlayerItem(pItem)) {
	removed = true;
	..

- Updated return logic in rg_remove_items_by_slot
- Updated removal logic for 'weapon_c4' slot considering 'arg_remammo' argument
@Javekson Javekson changed the title Updated return logic in rg_remove_items_by_slot function Updated return logic in rg_remove_items_by_slot Sep 17, 2023
@Javekson Javekson closed this Sep 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants