[HL2:DM] BotPing
- Painkiller
- Senior Member
- Posts: 751
- Joined: Sun Mar 01, 2015 8:09 am
- Location: Germany
- Contact:
Try this (untested):
Syntax: Select all
from random import randint
from entities.entity import Entity
from filters.players import PlayerIter
from listeners.tick import TickRepeat
# =================== #
# >> CONFIGURATION << #
# =================== #
LOW_PING = 30
HIGH_PING = 80
DELAY = 3
# ======================= #
# >> END CONFIGURATION << #
# ======================= #
bot_players = PlayerIter('bot')
@TickRepeat
def set_bot_ping():
player_manager = Entity.find('player_manager')
for bot in bot_players:
player_manager.set_property_int('m_iPing.%03d' % bot.index, randint(LOW_PING, HIGH_PING))
set_bot_ping.start(DELAY, 0)
- Painkiller
- Senior Member
- Posts: 751
- Joined: Sun Mar 01, 2015 8:09 am
- Location: Germany
- Contact:
Who is online
Users browsing this forum: No registered users and 66 guests