NPC:SendChat

NPC:SendChat

Description:
Function NPC:SendChat sends text to the player using an NPC, just like using SendPlayerMessageToAll, but this function must be used inside NPC scripts.
Function NPC:SendChat was added in 0.3a and will not work in earlier versions!


Parameters:
(msg[])
string msg The text to be sent by the NPC.


Return Values:
This function does not return any specific values.


Examples:
public OnPlayerDeath(playerid)
{
    new string[80], name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
 
    format(string, sizeof(string), "Oh no %s! I didn't want you to die that way!", name);
    SendChat(string);
    return 1;
}


Related Functions
The following functions may be useful, as they are related to this function in one way or another.