CanAdministerVending
Usage
- Return a non-null value to override default behavior
Example Autogenerated
csharp
private void CanAdministerVending( BasePlayer player, NPCVendingMachine instance )
{
Puts( "CanAdministerVending works!" );
}
csharp
private void CanAdministerVending( BasePlayer player, VendingMachine instance )
{
Puts( "CanAdministerVending works!" );
}
Location
- NPCVendingMachine::CanPlayerAdmin(BasePlayer player)
- VendingMachine::CanPlayerAdmin(BasePlayer player)
csharp
public override bool CanPlayerAdmin(BasePlayer player)
{
object returnvar = Interface.CallHook("CanAdministerVending", player, this);
return returnvar is bool && (bool)returnvar;
}
csharp
public virtual bool CanPlayerAdmin(BasePlayer player)
{
object returnvar = Interface.CallHook("CanAdministerVending", player, this);
if (returnvar is bool)
{
return (bool)returnvar;
}
return this.PlayerBehind(player) && base.OccupiedCheck(player);
//---