Я не издеваюсь. Просто люди договрились. Что мне стобой делать как не кикнуть.
Договорились без техники - значит без. А ты сел в танк и доволен....
Также можно и скрипт поставить на бэйсрейп как и на запрет техники и командера. Вот он [SPOILER="baserape"]# ------------------------------------------------------------------------
# Module: AntiBaseRape.py
# Author: SHAnders
# Port to bf2cc/mm: graag42
#
# Version 1.11
#
# Changes:
# v1.1 -> 1.11
# Fixed the timer to only be started once
# v1.0 -> 1.1
# Implemted a baseRapeWarning attribute on players to count safe base kills
# Implemted allowed amount of safe base kills (3)
# up to this amount player only loses kill points + 1 score pr baseRapeWarning
# over this amount player is allso killed
# Implemtes a timer for removing 1 baseRapeWarning every 2 minutes
#
# Description:
# Server side only admin script
#
# This script will punish players who kill enemy within the area of a safe base
#
# Requirements:
# None.
#
# Installation as Admin script:
# 1: Save this script as 'AntiBaseRape.py' in your <bf2>/admin/standard_admin directory.
# 2: Add the lines 'import AntiBaseRape' and 'AntiBaseRape.init()' to the file
# '<bf2>/admin/standard_admin/__init__.py'.
#
# TODO:
# Since not all maps are alike, the requirements for base rape protiction
# should be able to be altered individualy for each control point.
#
# Thanks to:
# Battlefield.no for inspiration from their pingkick.py script
#
# ------------------------------------------------------------------------
import host
import bf2
import math
import mm_utils
from bf2.stats.constants import *
from bf2 import g_debug
# Set the version of your module here
__version__ = 1.11
# Set the required module versions here
__required_modules__ = {
'modmanager': 1.0
}
# Does this module support reload ( are all its reference closed on shutdown? )
__supports_reload__ = True
# Set the description of your module here
__description__ = "AntiBaseRape v%s" % __version__
def init( self ):
if g_debug: print "AntiBaseRape init"
if 0 == self.__state:
host.registerHandler('PlayerConnect', self.onPlayerConnect, 1)
host.registerHandler('PlayerKilled', self.onPlayerKilled)
# Update to the running state
self.__state = 1
# Start the timer that reduces warnings on the SAFEBASEKILL_TIMER_INTERVAL
WarnReduceTimer = bf2.Timer(self.onSafeBaseKillTimer, SAFEBASEKILL_TIMER_INTERVAL, 1)
WarnReduceTimer.setRecurring(SAFEBASEKILL_TIMER_INTERVAL)
# Connect already connected players if reinitializing
for p in bf2.playerManager.getPlayers():
self.onPlayerConnect(p)
# ------------------------------------------------------------------------
# killed by enemy
elif attacker != None and attacker.getTeam() != victim.getTeam():
self.checkForSafeBase(attacker, victim)
# ------------------------------------------------------------------------
def shutdown( self ):
"""Shutdown and stop processing."""
# Unregister game handlers and do any other
# other actions to ensure your module no longer affects
# the game in anyway
if WarnReduceTimer:
WarnReduceTimer.destroy()
WarnReduceTimer = None
# Flag as shutdown as there is currently way to:
# host.unregisterHandler
self.__state = 2
# ------------------------------------------------------------------------
# Reset the number of warnings
# ------------------------------------------------------------------------
def resetPlayer(self, player):
player.baseRapeWarning = 0
# ------------------------------------------------------------------------
# ------------------------------------------------------------------------
# Check if victim was killed within safebase area
# ------------------------------------------------------------------------
def checkForSafeBase(self, attacker, victim):
currentmap = bf2.gameLogic.getMapName()
if currentmap == "dalian_plant":
DEFAULT_SAFEBASE_RADIUS = 130
if currentmap == "daqing_oilfields":
DEFAULT_SAFEBASE_RADIUS = 108
if currentmap == "dragon_valley":
DEFAULT_SAFEBASE_RADIUS = 44
if currentmap == "fushe_pass":
DEFAULT_SAFEBASE_RADIUS = 39
if currentmap == "gulf_of_oman":
DEFAULT_SAFEBASE_RADIUS = 55
if currentmap == "kubra_dam":
DEFAULT_SAFEBASE_RADIUS = 83
if currentmap == "operation_clean_sweep":
DEFAULT_SAFEBASE_RADIUS = 39
if currentmap == "road_to_jalalabad":
DEFAULT_SAFEBASE_RADIUS = 50
if currentmap == "sharqi_peninsula":
DEFAULT_SAFEBASE_RADIUS = 27
if currentmap == "strike_at_karkand":
DEFAULT_SAFEBASE_RADIUS = 54
if currentmap == "wake_island_2007":
DEFAULT_SAFEBASE_RADIUS = 135
if currentmap == "zatar_wetlands":
DEFAULT_SAFEBASE_RADIUS = 55
victimVehicle = victim.getVehicle()
controlPoints = bf2.objectManager.getObjectsOfType('dice.hfe.world.ObjectTemplate.ControlPoint')
for cp in controlPoints:
if cp.cp_getParam('unableToChangeTeam') != 0 and cp.cp_getParam('team') != attacker.getTeam():
distanceTo = self.getVectorDistance(victimVehicle.getPosition(), cp.getPosition())
if DEFAULT_SAFEBASE_RADIUS > float(distanceTo):
self.justify(attacker, victim, cp, distanceTo)
# ------------------------------------------------------------------------
# ------------------------------------------------------------------------
# Punish attacker, give victim life back and inform all
# ------------------------------------------------------------------------
def justify(self, attacker, victim, controlPoint, distanceTo):
victim.score.deaths += -1
attacker.score.kills += -1
attacker.score.score += -2 - attacker.baseRapeWarning
attacker.baseRapeWarning += 1
self.sendWarning(attacker, controlPoint, distanceTo)
if attacker.baseRapeWarning > ALLOWED_SAFEBASEKILLS:
attacker.score.TKs += 1
if attacker.isAlive():
vehicle = attacker.getVehicle()
rootVehicle = getRootParent(vehicle)
if getVehicleType(rootVehicle.templateName) == VEHICLE_TYPE_SOLDIER:
rootVehicle.setDamage(0)
# This should kill them !
else:
rootVehicle.setDamage(1)
# a vehicle will likely explode within 1 sec killing entire crew,
# not so sure about base defenses though
# ------------------------------------------------------------------------
# ------------------------------------------------------------------------
# Send Warning
# ------------------------------------------------------------------------
def sendWarning(self, player, controlPoint, distanceTo):
mapName = bf2.gameLogic.getMapName()
if player.baseRapeWarning > ALLOWED_SAFEBASEKILLS:
mm_utils.msg_server("§3" + player.getName() + " is punished for kill in safe base area §C1001(ATAKA NT)§C1001")
else:
mm_utils.msg_server(player.getName() + " has violated the no kill rules within safe base area " + str(player.baseRapeWarning) + " times now")
# ------------------------------------------------------------------------
# ------------------------------------------------------------------------
# remove baseRapeWarnings over time
# ------------------------------------------------------------------------
def onSafeBaseKillTimer(self, data):
for p in bf2.playerManager.getPlayers():
if p.baseRapeWarning <= 0:
p.baseRapeWarning = 0
else:
p.baseRapeWarning += -1
# ------------------------------------------------------------------------
# ------------------------------------------------------------------------
# ModManager Init
# ------------------------------------------------------------------------
def mm_load( modManager ):
"""Creates and returns your object."""
return BaseRape( modManager )[/SPOILER]
при убийстве когото на базе сам сразуже мрешь. Если из техники то она взорвется через 1 сек.
радиус:
dalian_plant: 130
daqing_oilfields: 108
dragon_valley: 44
fushe_pass: 39
gulf_of_oman: 55
kubra_dam: 83
operation_clean_sweep: 39
road_to_jalalabad: 50
sharqi_peninsula: 27
strike_at_karkand: 54
wake_island_2007: 135
zatar_wetlands: 55
это на тему нахождения на safe base (незахватываемая база)
P.s. обещание сбросить стату и бан еще в силе.
__________________
Возлюби ближнего своего, да не забудь о дальнем своем,
ибо подойдет он сзади, и возлюбит тебя и возрадуется!
Последний раз редактировалось Ramzz; 19.12.2008 в 00:08.
Причина: Добавлено сообщение
:blink: Можешь привести пример кто? я с ним потолокую в игре без анлоков. Ему понравится (обьясню что дела далеко не в анлоках а в умениии стрелтять. Т.к. снаряд по дуге и у винтовки летит.)
Тс частный или гдето сидите?
__________________
Возлюби ближнего своего, да не забудь о дальнем своем,
ибо подойдет он сзади, и возлюбит тебя и возрадуется!
Последний раз редактировалось Ramzz; 19.12.2008 в 08:59.
очень часто слышу по тимспику от команды: "зае*али они со своими анлоками". пообещал, что некоторым настрою и будут у них анлоки.))))
Вот это парни жгут , либо они ламаки, либо просто завидуют тем у кого есть анлоки. Ведь реално эти анлоки мало чем отличаются, просто изменяется слегда балланс у неготорых классов (прим. У инженера было дробовое оружие - стало скорострельный пистолет-пулемёт) дак это не беда т.к. вынести его можно с другого скорострельного оружия. Мне вот нравятся стандартные пушки это: Ак-101, РПК-74, М-24, Вот эти винтовки я не променяю на анлоки.
нет не ламаки, поверь. а чему тут завидовать? для нас че анлоки - это манна небесная,дотупная только Богам? просто я выдвинул идею об неиспользовании анлоков в нашей команде. не все довольны просто.
Последний раз редактировалось 12Y-olaSam; 19.12.2008 в 12:08.