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

(Help) Re scripting Amx to SPawn


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
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
 



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 19:21.


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