thanks for your help especially for comments in code
but my server is crashing now when bots see each other:/
Making bots aim for the head
-
- Junior Member
- Posts: 8
- Joined: Mon Mar 19, 2018 9:32 pm
Re: Making bots aim for the head
I just tested my code and it seems to run fine on windows. Not sure why it would crash on linux, sorry :(
-
- Junior Member
- Posts: 8
- Joined: Mon Mar 19, 2018 9:32 pm
Re: Making bots aim for the head
i just tested on windows and its working there aswell
but i need that for linux:(
I'm not sure, but it seems to me that the problem is in random.py for linux
but thank you anyway
but i need that for linux:(
I'm not sure, but it seems to me that the problem is in random.py for linux
but thank you anyway
Re: Making bots aim for the head
No, it's probably player.view_entity, which is pretty much the same like this issue:
https://github.com/Source-Python-Dev-Te ... issues/233
https://github.com/Source-Python-Dev-Te ... issues/233
-
- Junior Member
- Posts: 8
- Joined: Mon Mar 19, 2018 9:32 pm
Re: Making bots aim for the head
is there any way to avoid it?
Re: Making bots aim for the head
The short term solution is to change PreEvent to Event. Then bots will aim on the head on the second shot.
Re: Making bots aim for the head
Is there any way to make them aim for the head even better? Like they used to do in CS: Source?
Re: Making bots aim for the head
Ayuto wrote:Try this (untested):Syntax: Select all
import memory
from memory import find_binary, DataType, Convention
from memory.hooks import PostHook
from players.entity import Player
from entities.helpers import pointer_from_index
server = memory.find_binary('server', False)
PICK_AIM_SPOT = server[b'\x55\x89\xE5\x57\x56\x53\x81\xEC\x9C\x00\x00\x00\x8B\x5D\x08\x8B\x0D\x2A\x2A\x2A\x2A\x8B\x83\x70\x5A\x00\x00'].make_function(
Convention.THISCALL,
(DataType.POINTER,),
DataType.VOID
)
@PostHook(PICK_AIM_SPOT)
def post_pick_aim_spot(args, return_value):
playerPointer = args[0]
index = playerPointer.get_ushort(23152)
if (index != -1 and index < 32):
entPointer = pointer_from_index(index)
enemy = memory.make_object(Player, entPointer)
eyeLocation = enemy.eye_location
botProfile = playerPointer.get_pointer(14484)
skillLevel = botProfile.get_float(8)
playerPointer.set_float(eyeLocation[0], 23072)
playerPointer.set_float(eyeLocation[1] - (1 - skillLevel), 23076)
playerPointer.set_float(eyeLocation[2], 23080)
I got an error like this:
Access violation while reading address '37348'.
Can you help me ?
Thank you~
Re: Making bots aim for the head
On which game are you trying this? The code was made for CS:GO, which does not exist anymore.
Re: Making bots aim for the head
Ayuto wrote:On which game are you trying this? The code was made for CS:GO, which does not exist anymore.
I tried it on CS:GO legacy.
Is there any problem with that version ?
Return to “Plugin Development Support”
Who is online
Users browsing this forum: No registered users and 5 guests