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

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


Post New Thread Reply   
 
Thread Tools Display Modes
GuskiS
Veteran Member
Join Date: Aug 2007
Location: Latvia
Old 03-19-2016 , 06:55   Re: [v2.5.2, March 19] Trouble in Terrorist Town mod
Reply With Quote #511

It shouldn't be. You are doing something wrong then.
__________________
Finished mods:
Trouble in Terrorist Town
MurderMod
The Hidden
Cowboys vs Indians
JailBreak Supreme
Survival Madness
GuskiS is offline
sigerman
Senior Member
Join Date: Aug 2013
Location: Argentina, Bs.As.
Old 03-19-2016 , 17:44   Re: [v2.5.2, March 19] Trouble in Terrorist Town mod
Reply With Quote #512

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

Last edited by sigerman; 03-19-2016 at 19:12.
sigerman is offline
GuskiS
Veteran Member
Join Date: Aug 2007
Location: Latvia
Old 03-20-2016 , 05:49   Re: [v2.5.2, March 19] Trouble in Terrorist Town mod
Reply With Quote #513

How do you ban players normally?
__________________
Finished mods:
Trouble in Terrorist Town
MurderMod
The Hidden
Cowboys vs Indians
JailBreak Supreme
Survival Madness
GuskiS is offline
sigerman
Senior Member
Join Date: Aug 2013
Location: Argentina, Bs.As.
Old 03-20-2016 , 15:09   Re: [v2.5.2, March 19] Trouble in Terrorist Town mod
Reply With Quote #514

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
sigerman is offline
GuskiS
Veteran Member
Join Date: Aug 2007
Location: Latvia
Old 03-21-2016 , 02:29   Re: [v2.5.2, March 19] Trouble in Terrorist Town mod
Reply With Quote #515

server_cmd("amx_banip #%d %d MIN_KARMA:%d", get_user_userid(id), get_pcvar_num(cvar_warnings_bantime), karma);
__________________
Finished mods:
Trouble in Terrorist Town
MurderMod
The Hidden
Cowboys vs Indians
JailBreak Supreme
Survival Madness
GuskiS is offline
sigerman
Senior Member
Join Date: Aug 2013
Location: Argentina, Bs.As.
Old 03-22-2016 , 22:59   Re: [v2.5.2, March 19] Trouble in Terrorist Town mod
Reply With Quote #516

Quote:
Originally Posted by GuskiS View Post
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
sigerman is offline
GuskiS
Veteran Member
Join Date: Aug 2007
Location: Latvia
Old 03-23-2016 , 02:40   Re: [v2.5.2, March 19] Trouble in Terrorist Town mod
Reply With Quote #517

It should be working. Not sure why it isn't then.
__________________
Finished mods:
Trouble in Terrorist Town
MurderMod
The Hidden
Cowboys vs Indians
JailBreak Supreme
Survival Madness
GuskiS is offline
Depresie
Veteran Member
Join Date: Nov 2013
Old 03-23-2016 , 10:31   Re: [v2.5.2, March 19] Trouble in Terrorist Town mod
Reply With Quote #518

too bad there are no english servers...
__________________
Depresie is offline
GuskiS
Veteran Member
Join Date: Aug 2007
Location: Latvia
Old 03-23-2016 , 12:03   Re: [v2.5.2, March 19] Trouble in Terrorist Town mod
Reply With Quote #519

You can always open one
__________________
Finished mods:
Trouble in Terrorist Town
MurderMod
The Hidden
Cowboys vs Indians
JailBreak Supreme
Survival Madness
GuskiS is offline
Rivotril
Senior Member
Join Date: Feb 2014
Location: Argentina
Old 03-23-2016 , 22:13   Re: [v2.5.2, March 19] Trouble in Terrorist Town mod
Reply With Quote #520

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;
}
Rivotril is offline
Reply



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 14:45.


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