AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [Help] Edit plugin (https://forums.alliedmods.net/showthread.php?t=255063)

Shiina.Mashiro 01-10-2015 01:45

[Help] Edit plugin
 
Hi guys,
My server is using this gag player plugin by xPaw and Exolent:
https://forums.alliedmods.net/showthread.php?p=915763
This plugin gags player using their SteamID, but some member of my server use illegal version of CS 1.6 with some kind of SteamID Generator, so when they're gagged, they just generate new SteamID and they can talk normally.
So I would ask if anyone can help me to edit this plugin to gag player using IP or username (I think IP is better), I tried a few times but it didn't work :D
Thx :D

Obada 01-10-2015 02:41

Re: [Help] Edit plugin
 
Remove Dproto and update your server using SteamCMD.

Shiina.Mashiro 01-10-2015 05:10

Re: [Help] Edit plugin
 
Quote:

Originally Posted by Obada (Post 2247297)
Remove Dproto and update your server using SteamCMD.


I don't use dproto and im using SteamCMD bro

Obada 01-10-2015 08:11

Re: [Help] Edit plugin
 
Steam-Only servers do not allow "illegal" versions of CS 1.6 to access them.

and show us the following outputs of :-

Code:

rcon version
rcon meta list


Shiina.Mashiro 01-10-2015 09:51

Re: [Help] Edit plugin
 
Quote:

Originally Posted by Obada (Post 2247368)
Steam-Only servers do not allow "illegal" versions of CS 1.6 to access them.

and show us the following outputs of :-

Code:

rcon version
rcon meta list


PHP Code:

version
Protocol version 48
Exe version 1.1.2.7 
(cstrike)
Exe build13:13:29 Aug 29 2013 (6153

PHP Code:


meta list
Currently loaded plugins:
      
description      stat pend  file              vers      src  load  unlod
 
1AMX Mod X        RUN   -    amxmodx_mm.dll    v1.8.2    ini  Start ANY  
 
2bsploaderfixer   RUN   -    bsploaderfixer_m  v0.1.0    ini  ANY   ANY  
 
3Fun              RUN   -    fun_amxx.dll      v1.8.2    pl1  ANY   ANY  
 
4Engine           RUN   -    engine_amxx.dll   v1.8.2    pl1  ANY   ANY  
 
5FakeMeta         RUN   -    fakemeta_amxx.dl  v1.8.2    pl1  ANY   ANY  
 
6CStrike          RUN   -    cstrike_amxx.dll  v1.8.2    pl1  ANY   ANY  
 
7CSX              RUN   -    csx_amxx.dll      v1.8.2    pl1  ANY   ANY  
 
8Ham Sandwich     RUN   -    hamsandwich_amxx  v1.8.2    pl1  ANY   ANY  
 
9MySQL            RUN   -    mysql_amxx.dll    v1.8.2    pl1  ANY   ANY  
9 plugins
9 running 


Natsheh 01-10-2015 09:57

Re: [Help] Edit plugin
 
Here's any example how to gag by ip.

PHP Code:

/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <nVault>

#define PLUGIN "AMXX GAG CHAT BY IP"
#define VERSION "1.0"
#define AUTHOR "Natsheh"

new Vvaultis_user_gagged_byip[33]

public 
plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_message(get_user_msgid("SayText"), "message_handle")
    
    
register_concmd("amx_gag_byip""cmd_gag_byip"ADMIN_LEVEL_A"< Nick name - #id >")
    
register_concmd("amx_ungag_byip""cmd_ungag_byip"ADMIN_LEVEL_A"< Nick name - #id >")
}

public 
message_handle(msgidmsgdestent)
{
    new 
id get_msg_arg_int(1)
    
    if(!
is_user_gagged_byip[id])
        return
    
    
set_msg_block(msgidBLOCK_ONCE)
}

public 
plugin_cfg()
{
    
Vvault nvault_open("amx_gag_byip")
    
    if(!
Vvault)
    {
        
set_fail_state("Error to open nVault")
    }
}

public 
plugin_end()
{
    
nvault_close(Vvault)
}

public 
client_putinserver(id)
{
    
load_data(id)
}

public 
cmd_gag_byip(idlevelcid)
{
    if(!
cmd_access(idlevelcid1))
        return
    
    new 
Arg_player[32]
    
read_argv(1Arg_playercharsmax(Arg_player))
    
    new 
player cmd_target(idArg_player)
    
    if(!
player)
    {
        
console_print(id"[GAG] unable to find the player #id")
        return
    }
    
    new 
Admin_name[32], Player_name[32]
    
get_user_name(idAdmin_namecharsmax(Admin_name))
    
get_user_name(playerPlayer_namecharsmax(Player_name))
    
client_print(0print_chat"Admin %s: has gagged %s by ip from say/say_team"Admin_namePlayer_name)
    
    
is_user_gagged_byip[player] = true
    save_data
(player)
}

public 
cmd_ungag_byip(idlevelcid)
{
    if(!
cmd_access(idlevelcid1))
        return
    
    new 
Arg_player[32]
    
read_argv(1Arg_playercharsmax(Arg_player))
    
    new 
player cmd_target(idArg_player)
    
    if(!
player)
    {
        
console_print(id"[GAG] unable to find the player #id")
        return
    }
    
    new 
Admin_name[32], Player_name[32]
    
get_user_name(idAdmin_namecharsmax(Admin_name))
    
get_user_name(playerPlayer_namecharsmax(Player_name))
    
client_print(0print_chat"Admin %s: has ungagged %s from say/say_team"Admin_namePlayer_name)
    
    
is_user_gagged_byip[player] = false
    save_data
(player)
}

public 
save_data(id)
{
    new 
IPa[32], sKey[64]
    
get_user_ip(idIPacharsmax(IPa), 1)
    
    
formatex(sKeycharsmax(sKey), "IP-%s"IPa)
    
nvault_set(VvaultsKeyis_user_gagged_byip[id] ? "1":"0")
}

public 
load_data(id)
{
    new 
IPa[32], sKey[64], sValue
    get_user_ip
(idIPacharsmax(IPa), 1)
    
    
formatex(sKeycharsmax(sKey), "IP-%s"IPa)
    
sValue nvault_get(VvaultsKey)
    
    
is_user_gagged_byip[id] = sValue




All times are GMT -4. The time now is 15:20.

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