OnItemSubmit
Usage
- Return a non-null value to override default behavior
Example Autogenerated
csharp
private object OnItemSubmit( Item slot, Mailbox instance, BasePlayer fromPlayer )
{
Puts( "OnItemSubmit works!" );
return null;
}csharp
private void OnItemSubmit( )
{
Puts( "OnItemSubmit works!" );
}Location
- Mailbox::SubmitInputItems(BasePlayer fromPlayer)
- Mailbox::SubmitInputItems(BasePlayer fromPlayer)
csharp
public void SubmitInputItems(BasePlayer fromPlayer)
{
for (int i = 0; i < InputContainer.capacity; i++)
{
Item slot = InputContainer.GetSlot(i);
if (slot == null || Interface.CallHook("OnItemSubmit", slot, this, fromPlayer) != null || !slot.MoveToContainer(base.inventory))
{
continue;
}
Effect.server.Run(mailDropSound.resourcePath, GetDropPosition());
if (fromPlayer != null && !PlayerIsOwner(fromPlayer))
//---csharp
public void SubmitInputItems(BasePlayer fromPlayer)
{
for (int i = 0; i < InputContainer.capacity; i++)
{
Item slot = InputContainer.GetSlot(i);
if (slot == null || Interface.CallHook("OnItemSubmit", slot, this, fromPlayer) != null || !slot.MoveToContainer(base.inventory))
{
continue;
}
Effect.server.Run(mailDropSound.resourcePath, GetDropPosition());
if (fromPlayer != null && !PlayerIsOwner(fromPlayer))
//---