Raised This Month: $ Target: $400
 0% 

Help changing TK Plugin, Ban by IP instead AuthId


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Flashhh!
Senior Member
Join Date: Nov 2005
Old 02-26-2006 , 20:07   Help changing TK Plugin, Ban by IP instead AuthId
Reply With Quote #1

Hello I need to modify a TK Plugin to work on Lan. Because on Lan we have STEAM_ID_LAN instead a "real" number of Steam Id.

The plugin is :
http://www.dodplugins.net/download.php?id=544

I think I shuould modify this part:
Code:
else if (tkcount[teamkiller[id]] > zTKs){
		new tkername[32]
		get_user_name(teamkiller[id],tkername,31)
		new zTKMode = get_cvar_num("dod_tkrevenge_ban")
		if(zTKMode == 0 && is_user_connected(teamkiller[id])){
			client_print(0,print_chat,"[DoD TK Revenge] %s has been kicked for Excessive TeamKilling!",tkername)
			new tker_userid = get_user_userid(teamkiller[id])
			server_cmd("kick #%d Excessive TeamKilling",tker_userid)
		}
		else if(zTKMode == 1 && is_user_connected(teamkiller[id])){
			new Float:tker_bantime = get_cvar_float("dod_tkrevenge_bantime")
			new tker_bantimeint = get_cvar_num("dod_tkrevenge_bantime")
			if(get_cvar_num("dod_tkrevenge_useamxbans") == 1){
				new tker_authid[32]
				get_user_authid(teamkiller[id],tker_authid,31)
				new banreason[128]
				get_cvar_string("dod_tkrevenge_amxbansreason",banreason,127)
				server_cmd("amx_ban %d %s %s",tker_bantimeint,tker_authid,banreason)
			}
			else if(get_cvar_num("dod_tkrevenge_useamxbans") == 0){
				new tker_userid = get_user_userid(teamkiller[id])
				server_cmd("banid %f #%d kick;writeid",tker_bantime,tker_userid)
			}
If I dont use amxbans I think that the only part of this code that should I change is:
Code:
else if(get_cvar_num("dod_tkrevenge_useamxbans") == 0){
				new tker_userid = get_user_userid(teamkiller[id])
				server_cmd("banid %f #%d kick;writeid",tker_bantime,tker_userid)
So the question is how to modify the plugin that ban by IP or By Nick of the player beacuse not work on LAN (all users have STEAM_ID_LAN)??


I found this part of a modify plmenu.sma that ban by IP, may be help...:
Code:
/* ---------- check for Steam ID added by MistaGee -------------------- 
      		IF AUTHID == 4294967295 OR STEAM_ID_LAN OR HLTV, BAN PER IP TO NOT BAN EVERYONE */
      if ( (equal("4294967295",authid2)) || (equal("HLTV",authid2)) || (equali("STEAM_ID_LAN",authid2))) { /* lan or HLTV!*/  /* END OF MODIFICATIONS BY MISTAGEE */
        new ipa[32]
        get_user_ip(player,ipa,31,1)
        server_cmd("addip %d %s;writeip",g_menuSettings[id],ipa)
      }
      else
        server_cmd("banid %d #%d kick;writeid",g_menuSettings[id],userid2)

      server_exec()
Flashhh! is offline
 



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 20:26.


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