Forum
Chat Messages - Printable Version

+- Forum (https://dm20.net/forum)
+-- Forum: Scripting (https://dm20.net/forum/forumdisplay.php?fid=5)
+--- Forum: Showcase (https://dm20.net/forum/forumdisplay.php?fid=6)
+--- Thread: Chat Messages (/showthread.php?tid=10)



Chat Messages - marcudaniel1337 - 07-28-2024

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!")
}