Forum

Full Version: Chat Messages
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
This plugin has 2 chat messages that repeat themselves and a welcome message to the player.

Code:
#include <amxmodx>

public plugin_init()
{
    register_plugin("Chat Messages", "1.0", "sToP !")
    set_task(120.0, "printText", _, _, _, "b")
    set_task(67.0, "printText2", _, _, _, "b")
}

public printText()
{
    client_print(0, print_chat, "[HL.DM20.NET] Write /spec to move to spectator or come back.")
}

public printText2()
{
    client_print(0, print_chat, "[HL.DM20.NET] We are looking for admins. Access www.DM20.net/forum for more info!")
}

public client_putinserver(id)
{
    set_task(5.0,"delayed_message",id)
    return PLUGIN_CONTINUE
}

public delayed_message(id)
{
    client_print(id, print_chat, "[HL.DM20.NET] Welcome to our server. Access www.DM20.net/forum for more info!")
}