Scripting/Squirrel/Functions/Misc/MessagePlayer

From VC-MP Wiki

Jump to: navigation, search

This function sends a personal message to a player in the game.

Syntax

bool MessagePlayer( string text, player plr )

Arguments

  • text - This is the message to send to the player
  • plr - This is the pointer of the player

Example

This will send a personal message saying 'Testing PM...' when a player types '/c testpm'

function onPlayerCommand( player, cmd, text )
{
     if ( cmd == "testpm" )
     {
          MessagePlayer( "Testing PM...", player );
     }
}

Notes

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

Related Functions

Personal tools
squirrel scripting