99399febad
Using button while 'waiting' would otherwise cause the item to go on cooldown in entWatch, while not actually being successfully used in the map.
159 lines
2.3 KiB
SourcePawn
159 lines
2.3 KiB
SourcePawn
#if defined entWatch_class_item_included
|
|
#endinput
|
|
#endif
|
|
|
|
#define entWatch_class_item_included
|
|
|
|
methodmap CItem < Basic
|
|
{
|
|
public CItem(CConfig value = view_as<CConfig>(INVALID_HANDLE))
|
|
{
|
|
Basic myclass = new Basic();
|
|
|
|
myclass.SetHandle("dConfig", value);
|
|
|
|
myclass.SetInt("iClient", INVALID_ENT_REFERENCE);
|
|
myclass.SetInt("iButton", INVALID_ENT_REFERENCE);
|
|
myclass.SetInt("iWeapon", INVALID_ENT_REFERENCE);
|
|
myclass.SetInt("iTrigger", INVALID_ENT_REFERENCE);
|
|
|
|
myclass.SetInt("iTimesUsed", 0);
|
|
myclass.SetInt("iTimeReady", 0);
|
|
myclass.SetInt("iWaitTill", 0);
|
|
|
|
return view_as<CItem>(myclass);
|
|
}
|
|
|
|
|
|
property CConfig dConfig
|
|
{
|
|
public get()
|
|
{
|
|
return view_as<CConfig>(this.GetHandle("dConfig"));
|
|
}
|
|
public set(CConfig value)
|
|
{
|
|
this.SetHandle("dConfig", value);
|
|
}
|
|
}
|
|
|
|
|
|
property int iClient
|
|
{
|
|
public get()
|
|
{
|
|
return this.GetInt("iClient");
|
|
}
|
|
public set(int value)
|
|
{
|
|
this.SetInt("iClient", value);
|
|
}
|
|
}
|
|
|
|
property int iButton
|
|
{
|
|
public get()
|
|
{
|
|
return this.GetInt("iButton");
|
|
}
|
|
public set(int value)
|
|
{
|
|
this.SetInt("iButton", value);
|
|
}
|
|
}
|
|
|
|
property int iWeapon
|
|
{
|
|
public get()
|
|
{
|
|
return this.GetInt("iWeapon");
|
|
}
|
|
public set(int value)
|
|
{
|
|
this.SetInt("iWeapon", value);
|
|
}
|
|
}
|
|
|
|
property int iTrigger
|
|
{
|
|
public get()
|
|
{
|
|
return this.GetInt("iTrigger");
|
|
}
|
|
public set(int value)
|
|
{
|
|
this.SetInt("iTrigger", value);
|
|
}
|
|
}
|
|
|
|
|
|
property int iTimesUsed
|
|
{
|
|
public get()
|
|
{
|
|
return this.GetInt("iTimesUsed");
|
|
}
|
|
public set(int value)
|
|
{
|
|
this.SetInt("iTimesUsed", value);
|
|
}
|
|
}
|
|
|
|
property int iTimeReady
|
|
{
|
|
public get()
|
|
{
|
|
return this.GetInt("iTimeReady");
|
|
}
|
|
public set(int value)
|
|
{
|
|
this.SetInt("iTimeReady", value);
|
|
}
|
|
}
|
|
|
|
property int iWaitTill
|
|
{
|
|
public get()
|
|
{
|
|
return this.GetInt("iWaitTill");
|
|
}
|
|
public set(int value)
|
|
{
|
|
this.SetInt("iWaitTill", value);
|
|
}
|
|
}
|
|
|
|
|
|
property bool bClient
|
|
{
|
|
public get()
|
|
{
|
|
return view_as<bool>(this.iClient != INVALID_ENT_REFERENCE);
|
|
}
|
|
}
|
|
|
|
property bool bButton
|
|
{
|
|
public get()
|
|
{
|
|
return view_as<bool>(this.iButton != INVALID_ENT_REFERENCE);
|
|
}
|
|
}
|
|
|
|
property bool bWeapon
|
|
{
|
|
public get()
|
|
{
|
|
return view_as<bool>(this.iWeapon != INVALID_ENT_REFERENCE);
|
|
}
|
|
}
|
|
|
|
property bool bTrigger
|
|
{
|
|
public get()
|
|
{
|
|
return view_as<bool>(this.iTrigger != INVALID_ENT_REFERENCE);
|
|
}
|
|
}
|
|
}
|