📄 playeritems.h
字号:
#define MAX_WEAPON_NAME 128
struct HlWeaponInfo
{
char szName[MAX_WEAPON_NAME];
int iAmmoType;
int iAmmo2Type;
int iMax1;
int iMax2;
int iSlot;
int iSlotPos;
int iFlags;
int iId;
int iClip;
};
using namespace std;
class PlayerItems
{
public:
void msgWeaponList(int iSize, void *pbuf );
void msgCurWeapon (int iStat, int iId, int iClip );
void clearWeaponSlots(){slot1Index=-1; slot2Index=-1;}
char* getNamebyId(int id);
bool canSwitch();
char* getName1()
{
if(slot1Index==-1){ return "none"; }
else { return weaponList[slot1Index].szName; }
}
char* getName2()
{
if(slot2Index==-1){ return "none"; }
else { return weaponList[slot2Index].szName; }
}
bool hasWeapon(const char* name);
vector<HlWeaponInfo> weaponList;
int slot1Index;
int slot2Index;
int currentSlot;
int armor;
int money;
protected:
void* my_data;
public:
PlayerItems();
~PlayerItems();
};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -