Skip to content

A SA-MP plugin that detects when players open or close the chatbox.

Notifications You must be signed in to change notification settings

novusr/samp-chatdetector-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SAMP-ChatDetector

Detects when players open or close the chatbox (T key).

Using

Place the plugin files in your server directory:

  • Windows: ChatDetector.dllplugins/
  • Linux: ChatDetector.soplugins/
  • Client: ChatDetector.asi → SA-MP directory

Add to server.cfg:

plugins ChatDetector

Include the header file in your script:

#include <SAMP-ChatDetector>

Simple example

public OnPlayerTypingStateChange(playerid, bool:isTyping)
{
    new buffer[64], name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));

    if (isTyping)
    {
        format(buffer, sizeof(buffer), "%s is typing...", name);
    }
    else
    {
        format(buffer, sizeof(buffer), "%s stopped typing.", name);
    }
    SendClientMessageToAll(-1, buffer);
}

Callback

Callback Description
OnPlayerTypingStateChange(playerid, bool:isTyping) Called when a player opens or closes the chatbox. isTyping is true when opened, false when closed.

About

A SA-MP plugin that detects when players open or close the chatbox.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages