AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Approved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=8)
-   -   [v2.5.2, March 19] Trouble in Terrorist Town mod (https://forums.alliedmods.net/showthread.php?t=238780)

GuskiS 03-19-2016 06:55

Re: [v2.5.2, March 19] Trouble in Terrorist Town mod
 
It shouldn't be. You are doing something wrong then.

sigerman 03-19-2016 17:44

Re: [v2.5.2, March 19] Trouble in Terrorist Town mod
 
My server is not banning on low karma or warnings. I followed your tips GuskiS, and still the same.

I've found a solution but only works in my server for warnings, is it possible to do the same with low karma?

Code:

server_cmd("amx_banip %d #%d MIN_KARMA:%d", get_pcvar_num(cvar_warnings_bantime), get_user_userid(id), karma);
Code:

new ipa[32];
       
get_user_ip(id, ipa, 31, 1);
       
server_cmd("addip %d %s;writeip", get_pcvar_num(cvar_warnings_bantime), ipa);



I've been searching a solution since october 2015 without success

GuskiS 03-20-2016 05:49

Re: [v2.5.2, March 19] Trouble in Terrorist Town mod
 
How do you ban players normally?

sigerman 03-20-2016 15:09

Re: [v2.5.2, March 19] Trouble in Terrorist Town mod
 
amx_banip <#userid> <time in minutes> <reason>

Seeing that the lines with addip worked, may be safe to use, addip <minutes> <ipaddress>

All the options I tried with amx_banip did not worked for me

GuskiS 03-21-2016 02:29

Re: [v2.5.2, March 19] Trouble in Terrorist Town mod
 
server_cmd("amx_banip #%d %d MIN_KARMA:%d", get_user_userid(id), get_pcvar_num(cvar_warnings_bantime), karma);

sigerman 03-22-2016 22:59

Re: [v2.5.2, March 19] Trouble in Terrorist Town mod
 
Quote:

Originally Posted by GuskiS (Post 2382299)
Then you need to use:
server_cmd("amx_banip #%d %d TK:%s", get_user_userid(killer), get_pcvar_num(cvar_warnings_bantime), reason);
and

server_cmd("amx_banip #%d %d MIN_KARMA:%d", get_user_userid(id), get_pcvar_num(cvar_warnings_bantime), karma);

I've already tested those, at least in my server they are not working

I think a solution with addip would be definitive to users that have the same problem as me

Thanks for spending some of your time here supporting everyone. I appreciate It

GuskiS 03-23-2016 02:40

Re: [v2.5.2, March 19] Trouble in Terrorist Town mod
 
It should be working. Not sure why it isn't then.

Depresie 03-23-2016 10:31

Re: [v2.5.2, March 19] Trouble in Terrorist Town mod
 
too bad there are no english servers...

GuskiS 03-23-2016 12:03

Re: [v2.5.2, March 19] Trouble in Terrorist Town mod
 
You can always open one :D

Rivotril 03-23-2016 22:13

Re: [v2.5.2, March 19] Trouble in Terrorist Town mod
 
Here is the code of the plugin, if you can tell me why is on first and not last, thanks guskis

Code:

#include <amxmodx>
#include <hamsandwich>
#include <engine>
#include <cs_weapons_api>
#include <amx_settings_api>
#include <ttt>

#define WEAPON_CSWID CSW_HEGRENADE
#define WEAPON_NAME "weapon_hegrenade"

new g_iItemID;
new cvar_weapon_price;
new cvar_weapon_damage;

public plugin_init()
{
    register_plugin("[TTT] Item: HE Grenade", TTT_VERSION, TTT_AUTHOR);

    cvar_weapon_price        = register_cvar("ttt_price_he",        "1");
    cvar_weapon_damage        = my_register_cvar("ttt_he_damage",        "1.0",        "HE Grenade Damage Multiplier (Default: 1.0)");

    new name[TTT_ITEMLENGHT];
    formatex(name, charsmax(name), "%L", LANG_PLAYER, "TTT_ITEM_ID19");// TTT_ITEM_ID12 reemplazalo por otro aca y en el lang , ejemplo TTT_ITEM_ID16 = HE GRENADE
    g_iItemID = ttt_buymenu_add(name, get_pcvar_num(cvar_weapon_price), PC_TRAITOR); // en PC_TRAIDOR podes poner PC_DETECTIVE si es que queres que sea para detectives solamente
}

public ttt_item_selected(id, item, name[], price)
{
    if(g_iItemID == item)
    {
        if(user_has_weapon(id, WEAPON_CSWID))
            ham_strip_weapon(id, WEAPON_NAME);

            static data[STOREABLE_STRUCTURE];
                if(!data[STRUCT_CSWA_CSW])
                {
                data[STRUCT_CSWA_ITEMID] = g_iItemID;
                data[STRUCT_CSWA_CSW] = WEAPON_CSWID;
                data[STRUCT_CSWA_DAMAGE] = _:get_pcvar_float(cvar_weapon_damage);
        }
       
        ham_give_weapon(id, "weapon_hegrenade");

        client_print_color(id, print_team_default, "%s %L", TTT_TAG, id, "TTT_ITEM2", name, id, "TTT_ITEM5");
        return PLUGIN_HANDLED;
    }

    return PLUGIN_CONTINUE;
}



All times are GMT -4. The time now is 17:51.

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