forked from UNLOZE/sm-plugins
Add entWatch4
This is still a beta thing. ¯\_(ツ)_/¯
This commit is contained in:
@@ -0,0 +1,289 @@
|
||||
#if defined entWatch_included
|
||||
#endinput
|
||||
#endif
|
||||
|
||||
#define entWatch_included
|
||||
|
||||
#define DISPLAY_CHAT (1 << 0)
|
||||
#define DISPLAY_HUD (1 << 1)
|
||||
#define DISPLAY_USE (1 << 2)
|
||||
|
||||
enum items
|
||||
{
|
||||
String:item_name[32],
|
||||
String:item_short[32],
|
||||
String:item_color[32],
|
||||
String:item_filter[32],
|
||||
item_buttonid,
|
||||
item_weaponid,
|
||||
item_triggerid,
|
||||
item_owner,
|
||||
item_button,
|
||||
item_weapon,
|
||||
item_trigger,
|
||||
item_display,
|
||||
item_mode,
|
||||
item_uses,
|
||||
item_maxuses,
|
||||
item_nextuse,
|
||||
item_cooldown,
|
||||
};
|
||||
|
||||
/*
|
||||
methodmap CItem < Basic
|
||||
{
|
||||
public CItem()
|
||||
{
|
||||
Basic myclass = new Basic();
|
||||
|
||||
myclass.SetHandle("hConfig", INVALID_HANDLE);
|
||||
myclass.SetInt("iOwner", INVALID_ENT_REFERENCE);
|
||||
myclass.SetInt("iButton", INVALID_ENT_REFERENCE);
|
||||
myclass.SetInt("iWeapon", INVALID_ENT_REFERENCE);
|
||||
myclass.SetInt("iTrigger", INVALID_ENT_REFERENCE);
|
||||
myclass.SetInt("iLastActivation", 0);
|
||||
myclass.SetInt("iActivations", 0);
|
||||
|
||||
return myclass;
|
||||
}
|
||||
|
||||
property CConfig hConfig
|
||||
{
|
||||
public get()
|
||||
{
|
||||
return this.GetHandle("hConfig");
|
||||
}
|
||||
public set(CConfig value)
|
||||
{
|
||||
this.SetHandle("hConfig", value);
|
||||
}
|
||||
}
|
||||
|
||||
property int iOwner
|
||||
{
|
||||
public get()
|
||||
{
|
||||
return this.GetInt("iOwner");
|
||||
}
|
||||
public set(int value)
|
||||
{
|
||||
this.SetInt("iOwner", 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 iLastActivation
|
||||
{
|
||||
public get()
|
||||
{
|
||||
return this.GetInt("iLastActivation");
|
||||
}
|
||||
public set(int value)
|
||||
{
|
||||
this.SetInt("iLastActivation", value);
|
||||
}
|
||||
}
|
||||
|
||||
property int iActivations
|
||||
{
|
||||
public get()
|
||||
{
|
||||
return this.GetInt("iActivations");
|
||||
}
|
||||
public set(int value)
|
||||
{
|
||||
this.SetInt("iActivations", value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
methodmap CConfig < Basic
|
||||
{
|
||||
public CConfig()
|
||||
{
|
||||
Basic myclass = new Basic();
|
||||
|
||||
myclass.SetString("sName", "");
|
||||
myclass.SetString("sShort", "");
|
||||
myclass.SetString("sColor", "");
|
||||
myclass.SetString("sFilter", "");
|
||||
|
||||
myclass.SetInt("iButtonID", 0);
|
||||
myclass.SetInt("iWeaponID", 0);
|
||||
myclass.SetInt("iTriggerID", 0);
|
||||
myclass.SetInt("iDisplay", 0);
|
||||
myclass.SetInt("iMode", 0);
|
||||
myclass.SetInt("iCooldown", 0);
|
||||
myclass.SetInt("iMaxActivations", 0);
|
||||
|
||||
return myclass;
|
||||
}
|
||||
|
||||
property char sName
|
||||
{
|
||||
public get()
|
||||
{
|
||||
return this.GetString("sName");
|
||||
}
|
||||
public set(char[] value)
|
||||
{
|
||||
this.SetString("sName", value);
|
||||
}
|
||||
}
|
||||
|
||||
property char sShort
|
||||
{
|
||||
public get()
|
||||
{
|
||||
return this.GetString("sShort");
|
||||
}
|
||||
public set(char[] value)
|
||||
{
|
||||
this.SetString("sShort", value);
|
||||
}
|
||||
}
|
||||
|
||||
property char sColor
|
||||
{
|
||||
public get()
|
||||
{
|
||||
return this.GetString("sColor");
|
||||
}
|
||||
public set(char[] value)
|
||||
{
|
||||
this.SetString("sColor", value);
|
||||
}
|
||||
}
|
||||
|
||||
property char sFilter
|
||||
{
|
||||
public get()
|
||||
{
|
||||
return this.GetString("sFilter");
|
||||
}
|
||||
public set(char[] value)
|
||||
{
|
||||
this.SetString("sFilter", value);
|
||||
}
|
||||
}
|
||||
|
||||
property int iButtonID
|
||||
{
|
||||
public get()
|
||||
{
|
||||
return this.GetInt("iButtonID");
|
||||
}
|
||||
public set(int value)
|
||||
{
|
||||
this.SetInt("iButtonID", value);
|
||||
}
|
||||
}
|
||||
|
||||
property int iWeaponID
|
||||
{
|
||||
public get()
|
||||
{
|
||||
return this.GetInt("iWeaponID");
|
||||
}
|
||||
public set(int value)
|
||||
{
|
||||
this.SetInt("iWeaponID", value);
|
||||
}
|
||||
}
|
||||
|
||||
property int iTriggerID
|
||||
{
|
||||
public get()
|
||||
{
|
||||
return this.GetInt("iTriggerID");
|
||||
}
|
||||
public set(int value)
|
||||
{
|
||||
this.SetInt("iTriggerID", value);
|
||||
}
|
||||
}
|
||||
|
||||
property int iDisplay
|
||||
{
|
||||
public get()
|
||||
{
|
||||
return this.GetInt("iDisplay");
|
||||
}
|
||||
public set(int value)
|
||||
{
|
||||
this.SetInt("iDisplay", value);
|
||||
}
|
||||
}
|
||||
|
||||
property int iMode
|
||||
{
|
||||
public get()
|
||||
{
|
||||
return this.GetInt("iMode");
|
||||
}
|
||||
public set(int value)
|
||||
{
|
||||
this.SetInt("iMode", value);
|
||||
}
|
||||
}
|
||||
|
||||
property int iCooldown
|
||||
{
|
||||
public get()
|
||||
{
|
||||
return this.GetInt("iCooldown");
|
||||
}
|
||||
public set(int value)
|
||||
{
|
||||
this.SetInt("iCooldown", value);
|
||||
}
|
||||
}
|
||||
|
||||
property int iMaxActivations
|
||||
{
|
||||
public get()
|
||||
{
|
||||
return this.GetInt("iMaxActivations");
|
||||
}
|
||||
public set(int value)
|
||||
{
|
||||
this.SetInt("iMaxActivations", value);
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
@@ -0,0 +1,40 @@
|
||||
#if defined entWatch_core_included
|
||||
#endinput
|
||||
#endif
|
||||
|
||||
#define entWatch_core_included
|
||||
|
||||
public SharedPlugin __pl_entWatch_core =
|
||||
{
|
||||
name = "entWatch-core",
|
||||
file = "entWatch-core.smx",
|
||||
|
||||
#if defined REQUIRE_PLUGIN
|
||||
required = 1
|
||||
#else
|
||||
required = 0
|
||||
#endif
|
||||
};
|
||||
|
||||
#if !defined REQUIRE_PLUGIN
|
||||
public void __pl_entWatch_core_SetNTVOptional()
|
||||
{
|
||||
MarkNativeAsOptional("EW_GetItemCount");
|
||||
MarkNativeAsOptional("EW_GetItemArray");
|
||||
MarkNativeAsOptional("EW_SetItemArray");
|
||||
}
|
||||
#endif
|
||||
|
||||
native int EW_GetItemCount();
|
||||
|
||||
native void EW_GetItemArray(int index, any[] itemArray, int size);
|
||||
native void EW_SetItemArray(int index, any[] itemArray, int size);
|
||||
|
||||
forward void EW_OnClientItemDrop(any[] itemArray, int client, int index);
|
||||
forward void EW_OnClientItemDeath(any[] itemArray, int client, int index);
|
||||
forward void EW_OnClientItemPickup(any[] itemArray, int client, int index);
|
||||
forward void EW_OnClientItemActivate(any[] itemArray, int client, int index);
|
||||
forward void EW_OnClientItemDisconnect(any[] itemArray, int client, int index);
|
||||
|
||||
forward Action EW_OnClientItemCanPickup(any[] itemArray, int client, int index);
|
||||
forward Action EW_OnClientItemCanActivate(any[] itemArray, int client, int index);
|
||||
@@ -0,0 +1,33 @@
|
||||
#if defined entWatch_restrictions_included
|
||||
#endinput
|
||||
#endif
|
||||
|
||||
#define entWatch_restrictions_included
|
||||
|
||||
public SharedPlugin __pl_entWatch_core =
|
||||
{
|
||||
name = "entWatch-restrictions",
|
||||
file = "entWatch-restrictions.smx",
|
||||
|
||||
#if defined REQUIRE_PLUGIN
|
||||
required = 1
|
||||
#else
|
||||
required = 0
|
||||
#endif
|
||||
};
|
||||
|
||||
#if !defined REQUIRE_PLUGIN
|
||||
public void __pl_entWatch_core_SetNTVOptional()
|
||||
{
|
||||
MarkNativeAsOptional("EW_ClientRestrict");
|
||||
MarkNativeAsOptional("EW_ClientUnrestrict");
|
||||
MarkNativeAsOptional("EW_ClientRestricted");
|
||||
}
|
||||
#endif
|
||||
|
||||
native bool EW_ClientRestrict(int client, int target, int length);
|
||||
native bool EW_ClientUnrestrict(int client, int target);
|
||||
native bool EW_ClientRestricted(int client);
|
||||
|
||||
forward void EW_OnClientRestricted(int client, int target, int length);
|
||||
forward void EW_OnClientUnrestricted(int client, int target);
|
||||
Reference in New Issue
Block a user