Scripting/Squirrel/Functions/Misc/PrivMessage

From VC-MP Wiki

Jump to: navigation, search

Sends a player a private message

Syntax

bool PrivMessage( player PlayerTo, string Message )

Arguments

  • PlayerTo - The player to send the PM to
  • Message - The message to send to the player

Example

After the player types '/c pm2', to the player will be send a PM (green)

function onPlayerCommand( player, cmd, text )
{
     if ( cmd == "pm2" )
     {
          PrivMessage( "You've got a new PM!", player) ;
     }
}

Notes

The call onPlayerCommand was also used in the example. More info about this in the corresponding page.

Related Functions

Personal tools
squirrel scripting