Raised This Month: $51 Target: $400
 12% 

Game Started Message [Request Please]


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
leaffan
Senior Member
Join Date: Jan 2013
Old 04-27-2023 , 11:36   Game Started Message [Request Please]
Reply With Quote #1

Hello,

I would like a simple plugin that will display a 'GAME STARTED' message immediately after the survivor team leaves the safe area.

Do you have friends who can?

The moment the game starts 'Game has started, good luck!' I'm asking for a plugin that will work on Versus - Coop every Mod.

Thanks.

Footnote: There will be an add-on for Left 4 Dead 2, I forgot to mention.
Footnote(2): If possible, I would like to have a colored text.

Last edited by leaffan; 04-27-2023 at 11:38.
leaffan is offline
Drixevel
AlliedModders Donor
Join Date: Sep 2009
Location: Somewhere headbangin'
Old 04-27-2023 , 16:39   Re: Game Started Message [Request Please]
Reply With Quote #2

Code:
#include <sourcemod>

#pragma semicolon 1
#pragma newdecls required

public Plugin myinfo = {
    name        = "[L4D2] Game Start Message",
    author      = "Drixevel",
    description = "Prints a message in chat when the game starts.",
    version     = "1.0.0",
    url         = "https://drixevel.dev/"
};

public void OnPluginStart()
{
    HookEvent("player_left_start_area", Event_OnPlayerLeftStartArea);
}

public void Event_OnPlayerLeftStartArea(Event event, const char[] name, bool dontBroadcast) {
    PrintToChatAll("\x03GAME STARTED");
}
Attached Files
File Type: smx game-start-message.smx (3.0 KB, 40 views)
Drixevel is offline
leaffan
Senior Member
Join Date: Jan 2013
Old 04-29-2023 , 18:44   Re: Game Started Message [Request Please]
Reply With Quote #3

Quote:
Originally Posted by Drixevel View Post
Code:
#include <sourcemod>

#pragma semicolon 1
#pragma newdecls required

public Plugin myinfo = {
    name        = "[L4D2] Game Start Message",
    author      = "Drixevel",
    description = "Prints a message in chat when the game starts.",
    version     = "1.0.0",
    url         = "https://drixevel.dev/"
};

public void OnPluginStart()
{
    HookEvent("player_left_start_area", Event_OnPlayerLeftStartArea);
}

public void Event_OnPlayerLeftStartArea(Event event, const char[] name, bool dontBroadcast) {
    PrintToChatAll("\x03GAME STARTED");
}
Thank you very much, may I ask for a small edit that comes to mind?

Even before the addon leaves the safe zone, 'The game will start, wait.' What if he wrote something like And if it continues with a message like 'Game Started' when it leaves the safe area?

So two factor message;

> Message within safe area
> Message when leaving the safe area

Thanks.
leaffan is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:31.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode