Raised This Month: $214 Target: $400
 53% 

(Help) Re scripting Amx to SPawn


Post New Thread Reply   
 
Thread Tools Display Modes
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
FAQU
Member
Join Date: Sep 2020
Location: Romania
Old 05-07-2021 , 00:00   Re: (Help) Re scripting Amx to SPawn
Reply With Quote #2

I'm not familiar with amxx, but judging by the original code I think you're trying to prevent a client from getting kicked if the reason contains "[EAC]".

Afaik you can't prevent a client from disconnecting in sourcepawn.
__________________
FAQU is offline
JkDevArg
New Member
Join Date: Apr 2021
Location: Perú
Old 05-10-2021 , 21:32   Re: (Help) Re scripting Amx to SPawn
Reply With Quote #3

Quote:
Originally Posted by FAQU View Post
I'm not familiar with amxx, but judging by the original code I think you're trying to prevent a client from getting kicked if the reason contains "[EAC]".

Afaik you can't prevent a client from disconnecting in sourcepawn.
Oh well thank you for your reply. now I understand that it is not possible.
JkDevArg is offline
Reply


Thread Tools
Display Modes

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 05:25.


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