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);
|
|
|
|
|
|
|
|
/* ------------------------------------------------------------------------------------------------
|
|
|
|
* Modify the name associated with a weapon identifier.
|
|
|
|
*/
|
2016-11-16 14:10:33 +01:00
|
|
|
void SetWeaponName(Uint32 id, const StackStrF & name);
|
2016-05-22 05:20:38 +02:00
|
|
|
|
|
|
|
/* ------------------------------------------------------------------------------------------------
|
|
|
|
* Convert a weapon name to a weapon identifier.
|
|
|
|
*/
|
2016-11-16 14:10:33 +01:00
|
|
|
Int32 GetWeaponID(const 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_
|