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

Detect [NO-sXe-I] plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
alexinno
Senior Member
Join Date: Mar 2007
Location: C:\
Old 01-12-2008 , 03:20   Detect [NO-sXe-I] plugin
Reply With Quote #1

Hi!
I would like if it's possible to have a plugin that detects players without sxe-injected , so i put sxe in optional mod , and if a player doesn't have the anticheat installed and active he's nick will be tag-ed with [NO-sXe-I].

The plugin should detect players with [NO-sXe-I] at every round start and punish them with 25 hp (this value should be configurable)

Here is SAMURAI's try but no effect on players

Code:
#include <amxmodx>
#include <amxmisc>
#include <fun>

#define PLUGIN "No SXe Detect"
#define VERSION "1.0"
#define AUTHOR "SAMURAI"

new cvar_rmv_health;

public plugin_init() {
    register_plugin(PLUGIN, VERSION, AUTHOR)
    
    register_event("HLTV", "event_new_round", "a", "1=0", "2=0");
    
    cvar_rmv_health = register_cvar("health_penalty","10");
}

public event_new_round()
{
    static players[32], name[32], inum, i, id;
    get_players(players,inum);
    for(i = 0; i< inum;i++)
    {
        id = players[i];
        get_user_name(id,name,31);
        
        if(is_user_alive(id) && containi(name,"[NO-sXe-I]") !=-1 ) 
        {
            set_user_health(id,get_user_health(id) - get_pcvar_num(cvar_rmv_health));
            client_print(id,print_chat,"Ti s-a scazut %d din viata pentru ca nu ai sXe Inejected activat !",get_pcvar_num(cvar_rmv_health));
        
        }
    }
}
thx in advance
alexinno is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 01-12-2008 , 04:46   Re: Detect [NO-sXe-I] plugin
Reply With Quote #2

PHP Code:
#include <amxmodx>

#define MAX_PLAYERS 32

new bool:g_bRestartAttempt[MAX_PLAYERS+1]
new 
bool:g_bNoSxe[MAX_PLAYERS+1]

new 
g_pcvarHpPunish

public plugin_init() {
    
register_plugin("Detect No sXe players""0.1""connorr")

    
g_pcvarHpPunish register_cvar("no_sxe_hp_punish""25")

    
register_event("TextMsg""eRestartAttempt""a""2=#Game_will_restart_in")
    
register_event("ResetHUD""eResetHUD""be")

    
register_clcmd("fullupdate""fullupdateCmd")
}

public 
fullupdateCmd() {
    return 
PLUGIN_HANDLED_MAIN
}

public 
eRestartAttempt() {
    new 
players[MAX_PLAYERS], num
    get_players
(playersnum"a")
    for (new 
inum; ++i)
        
g_bRestartAttempt[players[i]] = true
}

public 
eResetHUD(id) {
    if (
g_bRestartAttempt[id]) {
        
g_bRestartAttempt[id] = false
        
return
    }
    
event_player_spawn(id)
}
 
public 
event_player_spawn(id) {
    if(
g_bNoSxe[id])
        
user_slap(idget_pcvar_num(g_pcvarHpPunish), 0)
}

public 
client_putinserver(id) {
    static 
szName[32];get_user_name(idszName31)
    static const 
szNoSxe[] = "[NO-sXe-I]"
    
g_bNoSxe[id] = containi(szNameszNoSxe) != -true false

__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 01-12-2008 at 05:23.
ConnorMcLeod is offline
alexinno
Senior Member
Join Date: Mar 2007
Location: C:\
Old 01-12-2008 , 05:11   Re: Detect [NO-sXe-I] plugin
Reply With Quote #3

Your plugin failed to compile! Read the errors below:
Welcome to the AMX Mod X 1.76-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team

/home/groups/amxmodx/tmp3/phpyW8ajW.sma(42) : error 017: undefined symbol "no_sxe_hp_punish"
/home/groups/amxmodx/tmp3/phpyW8ajW.sma(49) : warning 217: loose indentation
/home/groups/amxmodx/tmp3/phpyW8ajW.sma(50) : warning 204: symbol is assigned a value that is never used: "g_pcvarHpPunish"

1 Error.
Could not locate output file /home/groups/amxmodx/public_html/websc3/phpyW8ajW.amx (compile failed).
alexinno is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 01-12-2008 , 05:23   Re: Detect [NO-sXe-I] plugin
Reply With Quote #4

Oups
Fixed
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
alexinno
Senior Member
Join Date: Mar 2007
Location: C:\
Old 01-12-2008 , 08:12   Re: Detect [NO-sXe-I] plugin
Reply With Quote #5

thx
alexinno is offline
sett1ng
New Member
Join Date: May 2020
Old 05-20-2020 , 01:45   Re: Detect [NO-sXe-I] plugin
Reply With Quote #6

[QUOTE=ConnorMcLeod;573165][php]#include <amxmodx>

Do you have any idea how I can edit this so that "[NO-sXe-I]" does not appear to the administrators of the server that do not enter with sxe? I have administrators who are steam and the injected sxe does not work for them
sett1ng is offline
alferd
Veteran Member
Join Date: Dec 2019
Location: Iran is Always Eternal
Old 05-20-2020 , 03:59   Re: Detect [NO-sXe-I] plugin
Reply With Quote #7

It is possible to automatically kick someone who does not have Sxe?
alferd is offline
instinctpt1
Senior Member
Join Date: Dec 2016
Location: Chandigarh, India
Old 05-21-2020 , 13:42   Re: Detect [NO-sXe-I] plugin
Reply With Quote #8

[QUOTE=sett1ng;2701170]
Quote:
Originally Posted by ConnorMcLeod View Post
[php]#include <amxmodx>

Do you have any idea how I can edit this so that "[NO-sXe-I]" does not appear to the administrators of the server that do not enter with sxe? I have administrators who are steam and the injected sxe does not work for them
PHP Code:
#include <amxmodx>
#include <amxmisc>

#define MAX_PLAYERS 32

new bool:g_bRestartAttempt[MAX_PLAYERS+1]
new 
bool:g_bNoSxe[MAX_PLAYERS+1]

new 
g_pcvarHpPunish

public plugin_init() {
    
register_plugin("Detect No sXe players""0.1""connorr")

    
g_pcvarHpPunish register_cvar("no_sxe_hp_punish""25")

    
register_event("TextMsg""eRestartAttempt""a""2=#Game_will_restart_in")
    
register_event("ResetHUD""eResetHUD""be")

    
register_clcmd("fullupdate""fullupdateCmd")
}

public 
fullupdateCmd() {
    return 
PLUGIN_HANDLED_MAIN
}

public 
eRestartAttempt() {
    new 
players[MAX_PLAYERS], num
    get_players
(playersnum"a")
    for (new 
inum; ++i)
        
g_bRestartAttempt[players[i]] = true
}

public 
eResetHUD(id) {
    if (
g_bRestartAttempt[id]) {
        
g_bRestartAttempt[id] = false
        
return
    }
    
event_player_spawn(id)
}
 
public 
event_player_spawn(id) {
    if(
g_bNoSxe[id])
        if(!
is_user_admin(id))
            
user_slap(idget_pcvar_num(g_pcvarHpPunish), 0)
}

public 
client_putinserver(id) {
    static 
szName[32];get_user_name(idszName31)
    static const 
szNoSxe[] = "[NO-sXe-I]"
    
g_bNoSxe[id] = containi(szNameszNoSxe) != -true false

I have added exceptions for admins, now they won't get punished
instinctpt1 is offline
instinctpt1
Senior Member
Join Date: Dec 2016
Location: Chandigarh, India
Old 05-21-2020 , 13:48   Re: Detect [NO-sXe-I] plugin
Reply With Quote #9

Quote:
Originally Posted by alferd View Post
It is possible to automatically kick someone who does not have Sxe?
Well i dont know about SXE but from the logic connor provided above, i modified it ; try
PHP Code:
#include <amxmodx>

public plugin_init() {
    
register_plugin("Detect No sXe players""0.1""connorr")
}

public 
client_putinserver(id) {
    static 
szName[32];get_user_name(idszNamecharsmax(szName));
    if(
containi(szName"[NO-sXe-I]") != -)
        
server_cmd("kick #%d ^"NO SXE NOT Allowed^""get_user_userid(id))


Last edited by instinctpt1; 05-23-2020 at 03:32. Reason: previous was correct
instinctpt1 is offline
tarsisd2
Veteran Member
Join Date: Feb 2016
Location: brazil
Old 05-21-2020 , 14:39   Re: Detect [NO-sXe-I] plugin
Reply With Quote #10

Quote:
Originally Posted by alferd View Post
It is possible to automatically kick someone who does not have Sxe?
if the player dont have sxe and is not set as optional, then the sxe will kick the player it self, dont need a plugin for that

Last edited by tarsisd2; 05-21-2020 at 16:58.
tarsisd2 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 15:17.


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