2015-09-30 02:56:11 +02:00
|
|
|
#ifndef _MISC_WEAPON_HPP_
|
|
|
|
#define _MISC_WEAPON_HPP_
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
2016-02-20 23:25:00 +01:00
|
|
|
#include "SqBase.hpp"
|
2015-09-30 02:56:11 +02:00
|
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
|
|
namespace SqMod {
|
|
|
|
|
2016-05-22 05:20:38 +02:00
|
|
|
/* ------------------------------------------------------------------------------------------------
|
|
|
|
* Retrieve the name associated with a weapon identifier.
|
|
|
|
*/
|
|
|
|
CSStr GetWeaponName(Uint32 id);
|
|
|
|
|
2018-04-13 19:31:18 +02:00
|
|
|
/* ------------------------------------------------------------------------------------------------
|
|
|
|
* Modify the name associated with a weapon identifier.
|
|
|
|
*/
|
2019-02-17 16:23:59 +01:00
|
|
|
void SetWeaponName(Uint32 id, StackStrF & name);
|
2018-04-13 19:31:18 +02:00
|
|
|
|
|
|
|
/* ------------------------------------------------------------------------------------------------
|
|
|
|
* Retrieve the total number of identifiers in the pool of custom weapon names.
|
|
|
|
*/
|
|
|
|
Uint32 GetCustomWeaponNamePoolSize();
|
|
|
|
|
|
|
|
/* ------------------------------------------------------------------------------------------------
|
|
|
|
* Clear all identifiersand associated names from the pool of custom weapon names.
|
|
|
|
*/
|
|
|
|
void ClearCustomWeaponNamePool();
|
|
|
|
|
2016-05-22 05:20:38 +02:00
|
|
|
/* ------------------------------------------------------------------------------------------------
|
|
|
|
* Modify the name associated with a weapon identifier.
|
|
|
|
*/
|
2019-02-17 16:23:59 +01:00
|
|
|
void SetWeaponName(Uint32 id, StackStrF & name);
|
2016-05-22 05:20:38 +02:00
|
|
|
|
|
|
|
/* ------------------------------------------------------------------------------------------------
|
|
|
|
* Convert a weapon name to a weapon identifier.
|
|
|
|
*/
|
2019-02-17 16:23:59 +01:00
|
|
|
Int32 GetWeaponID(StackStrF & name);
|
2016-05-22 05:20:38 +02:00
|
|
|
|
|
|
|
/* ------------------------------------------------------------------------------------------------
|
|
|
|
* See whether the specified weapon identifier is valid.
|
|
|
|
*/
|
2016-02-20 23:25:00 +01:00
|
|
|
bool IsWeaponValid(Int32 id);
|
2016-05-22 05:20:38 +02:00
|
|
|
|
|
|
|
/* ------------------------------------------------------------------------------------------------
|
|
|
|
* Convert the given weapon identifier to it's associated model identifier.
|
|
|
|
*/
|
2016-02-20 23:25:00 +01:00
|
|
|
Int32 WeaponToModel(Int32 id);
|
2015-09-30 02:56:11 +02:00
|
|
|
|
2016-05-22 05:20:38 +02:00
|
|
|
/* ------------------------------------------------------------------------------------------------
|
|
|
|
* See whether the given weapon identifier cannot be used by another player to inflict damage.
|
|
|
|
*/
|
|
|
|
bool IsWeaponNatural(Int32 id);
|
|
|
|
|
2015-09-30 02:56:11 +02:00
|
|
|
} // Namespace:: SqMod
|
|
|
|
|
|
|
|
#endif // _MISC_WEAPON_HPP_
|