You posted twice. Going with this one.
PHP Code:
#include <sourcemod>
#include <sdktools>
#define PLUGIN_VERSION "1.0.0"
public Plugin:myinfo =
{
name = "VIP Tag",
author = "-{RPG}- DoM",
description = "Adds [VIP] to specified players.",
version = PLUGIN_VERSION,
url = "http://www.RisingPhoenixGaming.net"
}
public OnPluginStart()
{
RegAdminCmd("sm_vipsay", CmdsayV, ADMFLAG_RESERVATION);
}
public Action:CmdsayV(client, args)
{
PrintHintTextToAll("[VIP] %N says hello", client);
return Plugin_Handled;
}
- Watch out for those includes. You didn't need cstrike or sdkhooks. (In this case you probably also don't need sdktools, but it's good to include it just in case)
- You can just use RegAdminCmd instead of RegConsoleCmd+checking their access.
- %N will print the client's name if you specify their client index, do that instead of GetClientName (which can take up three whole lines)
- PrintHintText prints hint text to one player, PrintHintTextToAll prints to all.
Now, assuming you want them to be able to specify what to say:
PHP Code:
public Action:CmdsayV(client, args)
{
new String:message[192];
GetCmdArgString(message, sizeof(message));
PrintHintTextToAll("[VIP] %N says: %s", client, message);
return Plugin_Handled;
}
__________________