Scripting/Squirrel/Events/Player/onPlayerFailedPM

From VC-MP Wiki

Jump to: navigation, search

This is called when a player tries to send a personal message to a player that is not online. This is called even if the player is muted.

Syntax

function onPlayerFailedPM( player, receiverID, message )

Parameters

  • player - The pointer of the player
  • receiverID - The ID of the receiver player tried to use
  • message - The message player said

Example

This example will notice the player that their message was not received.

function onPlayerFailedPM( player, playerTo, text )
{
     MessagePlayer( "Error: The requested player is not online, so the message was not sent.", player );
}

Notes

The function MessagePlayer was used in in this example. More info about it in the corresponding page.

Related Events

Personal tools
squirrel scripting