SafeClientInterface.
More...
#include <CSMAPI_types.h>
◆ AddExp()
| void SafeClientInterface::AddExp |
( |
int |
iAmount, |
|
|
bool |
bSpur = false |
|
) |
| |
Add experience to the currently selected weapon.
- Parameters
-
| iAmount | The amount of experience |
| bSpur | Should be set to 'true' if a weapon similar to Spur is using this. |
◆ ChangeArmsEnergy()
| bool SafeClientInterface::ChangeArmsEnergy |
( |
int |
iAmmoAmt | ) |
|
Add ammo to the held weapon.
- Parameters
-
| iAmmoAmt | The amount of ammo to add. |
- Returns
- Returns true on success.
◆ CountArmsBullet()
| int SafeClientInterface::CountArmsBullet |
( |
int |
iArmsCode | ) |
|
Get the number of active bullets w/ the given Weapon ID that this client has shot.
- Parameters
-
| iArmsCode | The weapon ID the bullets should be tied to. |
- Returns
- Returns the number of bullets matching the parameters.
◆ CountBulletNum()
| int SafeClientInterface::CountBulletNum |
( |
int |
iBulletCode | ) |
|
Get the number of active bullets w/ the given Bullet ID that this client has shot.
- Parameters
-
| iBulletCode | The bullet ID the bullets should have. |
- Returns
- Returns the number of bullets matching the parameters.
- Examples
- WeaponShoot.cpp.
◆ DamagePlayer()
| void SafeClientInterface::DamagePlayer |
( |
int |
iDamage | ) |
|
Damage this client's player.
- Parameters
-
| iDamage | The amount of damage to do. |
- Note
- This function handles death.
◆ GetArmsEnergy()
| int SafeClientInterface::GetArmsEnergy |
( |
int |
iWeaponId | ) |
|
Get the amount of ammo a wepaon has.
- Parameters
-
- Returns
- Returns the amount of ammo the weapon has, if we have it. If we don't have the specified weapon, then this returns -1.
◆ GetArmsExp()
| int SafeClientInterface::GetArmsExp |
( |
int |
iWeaponId, |
|
|
int * |
iMaxExp = NULL |
|
) |
| |
Get the amount of EXP a weapon has.
- Parameters
-
| iWeaponId | The weapon ID. |
| iMaxExp | A pointer to an int, to hold the amount of EXP needed to get to the next level. This can be NULL. |
- Returns
- Returns the amount of EXP the specified weapon has, unless we don't have it, in which this returns -1.
◆ GetArmsMaxEnergy()
| int SafeClientInterface::GetArmsMaxEnergy |
( |
int |
iWeaponId | ) |
|
Get the maximum amount of ammo a wepaon can have.
- Parameters
-
- Returns
- Returns the maximum amount of ammo the weapon can have, if we have it. If we don't have the specified weapon, then this returns -1.
◆ HasArmsEnergy()
| bool SafeClientInterface::HasArmsEnergy |
( |
int |
iWeaponId, |
|
|
int |
iAmount |
|
) |
| |
Test ammo amount for the given weapon.
- Parameters
-
| iWeaponId | The weapon ID. |
| iAmount | The amount to check for. |
- Returns
- Returns true if the weapon has exactly (or more than) iAmount.
◆ IsMaxExp()
| bool SafeClientInterface::IsMaxExp |
( |
| ) |
|
Check to see if we're at max EXP for the held weapon.
- Returns
- Returns true if the client is at max EXP for the selected weapon.
◆ Set()
Interface with a client.
- Parameters
-
| pClient | The client to interface with. Can be NULL to interface with the local player. |
| iSetType | The flags used to determine the best candidate for this interface. |
- Returns
- Returns true on success, otherwise returns false if it couldn't find a suitable client.
- See also
- SCI_SetType
◆ TestInput()
Test input flags against this client's Key.
- Parameters
-
| iFlags | The flags to test. |
| iInputType | The input type to test. |
- Returns
- Returns the result of testing the given flags against the input.
- See also
- KEYBIND
-
KEYBIND2
-
KEYBIND_JOY
◆ UseArmsEnergy()
| bool SafeClientInterface::UseArmsEnergy |
( |
int |
iAmount | ) |
|
Use ammo from the held weapon.
- Parameters
-
| iAmount | The amount of ammo to check for & decrement if available. |
- Returns
- Returns true if there was enough ammo, false if not.
- Examples
- WeaponShoot.cpp.
◆ mClient
The client we're interfacing with.
This will always be the server-sided client, UNLESS we aren't hosting the server.
◆ mMC
| MYCHAR* SafeClientInterface::mMC |
This client's player.
Can be NULL.
The documentation for this struct was generated from the following files: