PDA

View Full Version : Req. Custom join message to recognize donors


rlshky
06-08-2009, 05:12
What I'm looking for is something that allows a custom message to be printed when specific people connect. These people would be given a custom flag in order for the plugin to recognize them. I've looked @ http://forums.alliedmods.net/showthread.php?t=77306 but it's not exactly what I'm looking for. I'd like the default join messages to remain untouched and to just have something special for people who have donated to the server.

It would be something like "Server sponsor, (player name) has joined the game." Another request would to be to have the option for it to be a csay message.

DJ Tsunami
06-10-2009, 12:00
#pragma semicolon 1

#include <sourcemod>

#define PL_VERSION "1.0"

public Plugin:myinfo =
{
name = "Custom Join Message",
author = "Tsunami",
description = "Custom Join Message",
version = PL_VERSION,
url = "http://www.tsunami-productions.nl"
}

public OnClientPostAdminCheck(client)
{
if(GetUserFlagBits(client) & ADMFLAG_CUSTOM1|ADMFLAG_ROOT)
PrintToChatAll("Server sponsor, %N has joined the game.", client);
}

Nail
08-19-2009, 10:16
How to remove other messages "has joined the game" without deleting event?

DJ Tsunami
08-19-2009, 10:31
Message Suppression (http://forums.alliedmods.net/showthread.php?p=716436)

Nail
08-19-2009, 10:41
DJ Tsunami it crash my server too. It delete event and i need deleting only message

DJ Tsunami
08-19-2009, 10:44
It's not possible to delete events. Events are messages and it properly blocks the event thus blocking the message. I doubt that can crash your server, and if it does, file a bug.

Nail
08-19-2009, 10:55
On my server installed 18 sm scripts. Whan i start connect annoncer or Message Suppression or that:

#include <sourcemod>

public Plugin:myinfo = {
name = "CMB",
author = "Tom Hackers",
description = "Blocking",
version = "0.1",
url = "http://dcmagnets.ru"
};

public OnPluginStart()
{
HookEvent("player_connect",HasJoinedGame,EventHookMode_Pre);
}
public Action:HasJoinedGame(Handle:event, const String:name[], bool:dontBroadcast)
{
return Plugin_Handled;
}

My server crash and it can not started while I will not remove a script file