2020-03-22 01:45:04 +02:00
|
|
|
#pragma once
|
2015-09-30 03:56:11 +03:00
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2016-02-21 00:25:00 +02:00
|
|
|
#include "SqBase.hpp"
|
2015-09-30 03:56:11 +03:00
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
namespace SqMod {
|
|
|
|
|
2019-06-02 14:44:37 +05:00
|
|
|
/* ------------------------------------------------------------------------------------------------
|
|
|
|
* Retrieve the slot associated with a weapon identifier.
|
|
|
|
*/
|
2021-01-30 08:51:39 +02:00
|
|
|
SQMOD_NODISCARD uint32_t GetWeaponSlot(uint32_t id);
|
2019-06-02 14:44:37 +05:00
|
|
|
|
2016-05-22 06:20:38 +03:00
|
|
|
/* ------------------------------------------------------------------------------------------------
|
|
|
|
* Retrieve the name associated with a weapon identifier.
|
|
|
|
*/
|
2021-01-30 08:51:39 +02:00
|
|
|
SQMOD_NODISCARD const SQChar * GetWeaponName(uint32_t id);
|
2016-05-22 06:20:38 +03:00
|
|
|
|
2018-04-13 20:31:18 +03:00
|
|
|
/* ------------------------------------------------------------------------------------------------
|
|
|
|
* Modify the name associated with a weapon identifier.
|
|
|
|
*/
|
2021-01-30 08:51:39 +02:00
|
|
|
void SetWeaponName(uint32_t id, StackStrF & name);
|
2018-04-13 20:31:18 +03:00
|
|
|
|
|
|
|
/* ------------------------------------------------------------------------------------------------
|
|
|
|
* Retrieve the total number of identifiers in the pool of custom weapon names.
|
|
|
|
*/
|
2021-01-30 08:51:39 +02:00
|
|
|
SQMOD_NODISCARD uint32_t GetCustomWeaponNamePoolSize();
|
2018-04-13 20:31:18 +03:00
|
|
|
|
|
|
|
/* ------------------------------------------------------------------------------------------------
|
|
|
|
* Clear all identifiersand associated names from the pool of custom weapon names.
|
|
|
|
*/
|
|
|
|
void ClearCustomWeaponNamePool();
|
|
|
|
|
2016-05-22 06:20:38 +03:00
|
|
|
/* ------------------------------------------------------------------------------------------------
|
|
|
|
* Convert a weapon name to a weapon identifier.
|
|
|
|
*/
|
2021-01-30 08:51:39 +02:00
|
|
|
SQMOD_NODISCARD int32_t GetWeaponID(StackStrF & name);
|
2016-05-22 06:20:38 +03:00
|
|
|
|
|
|
|
/* ------------------------------------------------------------------------------------------------
|
|
|
|
* See whether the specified weapon identifier is valid.
|
|
|
|
*/
|
2021-01-30 08:51:39 +02:00
|
|
|
bool IsWeaponValid(int32_t id);
|
2016-05-22 06:20:38 +03:00
|
|
|
|
|
|
|
/* ------------------------------------------------------------------------------------------------
|
|
|
|
* Convert the given weapon identifier to it's associated model identifier.
|
|
|
|
*/
|
2021-01-30 08:51:39 +02:00
|
|
|
SQMOD_NODISCARD int32_t WeaponToModel(int32_t id);
|
2015-09-30 03:56:11 +03:00
|
|
|
|
2016-05-22 06:20:38 +03:00
|
|
|
/* ------------------------------------------------------------------------------------------------
|
|
|
|
* See whether the given weapon identifier cannot be used by another player to inflict damage.
|
|
|
|
*/
|
2021-01-30 08:51:39 +02:00
|
|
|
SQMOD_NODISCARD bool IsWeaponNatural(int32_t id);
|
2016-05-22 06:20:38 +03:00
|
|
|
|
2015-09-30 03:56:11 +03:00
|
|
|
} // Namespace:: SqMod
|