Hook List

Here you can find list of hooks and Information about them. More general information about hook usage you can find here.

 


McPhone.Hook.CallStart

  Server McPhone.Hook.CallStart( Player caller, Player receiver )

Description

Called when player (caller) starts calling a player (receiver)

Arguments

  1. Player caller | Player, who started the call
  2. Player receiver | Player, who received the call

 

 


McPhone.Hook.UnsuccessCall

  Server McPhone.Hook.UnsuccessCall( Player caller, string number )

Description

Called when player (caller) starts unsuccessful phone call

Arguments

  1. Player caller | Player, who started the call
  2. string numbe | Number, which player tried to reach

 

 


McPhone.Hook.ExtraNumberCalled

  Server McPhone.Hook.ExtraNumberCalled( Player caller, table number )

Description

Called when player (caller) calls scripted phone number

Arguments

  1. Player caller | Player, who started the call
  2. table number | ExtraNumber data

 

 


McPhone.Hook.OnCallEnd

  Server McPhone.Hook.CallStoped( Player ply1, Player ply2 )

Description

Called when player (ply1) interrupts phone call with another player (ply2)

Arguments

  1. Player ply1 | Player, who stopped the call
  2. Player ply2 | Player, who was on call

 

 


McPhone.Hook.Accept

  Server McPhone.Hook.Accept( Player receiver, Player caller )

Description

Called when player (receiver) accept call from player (caller)

Arguments

  1. Player receiver | Player, who accepted the call
  2. Player caller | Player, who calle

 

 


McPhone.Hook.SendSMS

  Server McPhone.Hook.SendSMS( Player sender, Player receiver, string message )

Description

Called when player (sender) sent an sms message to player (receiver)

Arguments

  1. Player receiver | Player, who sent the sms
  2. Player caller | Player, who received the sms
  3. string message | Message text

 

 


McPhone.Hook.SendMail

  Server McPhone.Hook.SendMail( Player sender,  string topic, string message )

Description

Called when player (sender) sends an email

Arguments

  1. Player sender | Player, who sent the email
  2. string topic | Email topic
  3. string message | Message text

 

 


McPhone.Hook.OnPhoneDropped

  Server McPhone.Hook.OnPhoneDropped( Player ply, Entity phone )

Description

Called when player drops his phone

Arguments

  1. Player ply | Player, who dropped his phone
  2. Entity phone | Phone entity, that was created

 

 


McPhone.Hook.OnPhonePicked

  Server McPhone.Hook.OnPhonePicked( Player ply, Entity phone )

Description

Called when player picked up a phone entity

Arguments

  1. Player ply | Player, who picked up the phone entity
  2. Entity phone | Phone entity, that was picked up

 

 


McPhone.Hook.BlockPhone

 Shared McPhone.Hook.BlockPhone( Player ply )

Description

Server side | Called before player starts any phone call

Client side | Called every frame. Automatically closes phone, if hook returns true

Arguments

  1. Player ply | Player, who wants to use a phone

Returns

  1. boolean | block phone from usage by a player