I need to do something like this from this plugin but at SourcePawn, can anyone help me?
I did something similar but it is not the same or I am doing it wrong.
Replace this
PHP Code:
#include <amxmodx>
#include <reapi>
#define PLUGIN "Anti Kick EAC"
#define VERSION "0.1"
#define AUTHOR "Mario AR."
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR);
/*
register_message(get_user_msgid("TextMsg"), "fw_TextMsg");
register_message(get_user_msgid("SayText"), "fw_SayText");
register_message(get_user_msgid("HudText"), "fw_HudText");
*/
RegisterHookChain(RH_SV_DropClient, "fw_disconnect");
}
public fw_disconnect(id, crash, fmt[])
{
if (contain(fmt, "[EAC]") > -1)
return HC_BREAK;
return HC_CONTINUE;
}
this is my code.
PHP Code:
#include <sdktools>
#include <sdkhooks>
#define PLUGIN_AUTHOR ""
#define PLUGIN_VERSION "1.0"
public Plugin myinfo =
{
name = "AntiKick EAC",
author = PLUGIN_AUTHOR,
description = "Fix Kick by EAC",
version = PLUGIN_VERSION,
url = ""
};
public OnPluginStart(){
HookEvent("player_disconnect", Event_PlayerDisconnect, EventHookMode_Pre);
}
public Action Event_PlayerDisconnect(Handle event, const char[] name, bool dontBroadcast, char rejectReason[255]){
PrintToServer("A Player Has Disconnected.");
}
I appreciate any help
pd: sorry for my english :c