sourcebans-pp icon indicating copy to clipboard operation
sourcebans-pp copied to clipboard

Add two natives to get the number of bans and comms ban of a client.

Open Sarrus1 opened this issue 3 years ago • 2 comments

Description

Added an include file and two natives for sbppchecker, which allow to get the number of bans and comms ban for a client, synchronously.

Motivation and Context

It is useful for calladmin plugins to send information on the target, so admin can decide more easily what to do.

How Has This Been Tested?

On the latest version of sbpp, with an external plugin which calls the native when a command is called in the server.

Types of changes

  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [X] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • [X] My code follows the code style of this project.
  • [X] My change requires a change to the documentation.
  • [X] I have updated the documentation accordingly.
  • [X] I have read the CONTRIBUTING document.

Sarrus1 avatar Jan 28 '22 10:01 Sarrus1

Hey, I was looking for this feature. Nice to see I don't have to PR it now :D

DosMike avatar Feb 17 '22 12:02 DosMike

A forward for might be nice to have too for when data are loaded. Maybe something like forward void SBCheckerOnClientLoaded(int client, int gamebans, int commbans)?

DosMike avatar Feb 17 '22 13:02 DosMike

@Sarrus1 can you rebase this to thephp81 branch?

ashort96 avatar Sep 17 '22 14:09 ashort96