View Single Post
Author Message
JkDevArg
New Member
Join Date: Apr 2021
Location: Perú
Old 05-06-2021 , 12:41   (Help) Re scripting Amx to SPawn
Reply With Quote #1

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(PLUGINVERSIONAUTHOR);
    
    
/*
    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(idcrashfmt[])
{

    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_PlayerDisconnectEventHookMode_Pre);
}


public 
Action  Event_PlayerDisconnect(Handle event, const char[] namebool dontBroadcastchar rejectReason[255]){

PrintToServer("A Player Has Disconnected.");


I appreciate any help


pd: sorry for my english :c
JkDevArg is offline