And loop it.But it work so bad. bcuz it lagging. it so happens that shooting is interrupted and does not allow to recharge.and it is equally impossible to shoot spraying.
have they got how to send the game +attack and -attack and emulate human shooting?
i saw a source code of other guys where they use Client+dwAttack and write 1 or 0 but it doesnt work..
+attack is a console command just like -attack is a console command. Whenever you press the attack key ( for instance left mouse ), the game issues a console command by copying the command "+attack 107" into the command buffer and executing the command. I suppose 107 is a keycode which indicates the key which was issued. 107 is the being used when i press the left mouse button while 108 is being used whenever i press the right mouse button. The console command +attack is writing to the memory value which is used to indicate whether you're attacking or not. Because scrolling the mousewheel isn't issueing a key release event ( aka -attack for instance ), the game writes 6 o the memory value, which will simulate the key release for you.
This is in the wrong order. You stop attacking, wait a while and start attacking afterwards. If you want to do it correctly, you should write 5 to start attacking ( aka +attack ), wait a short while and write 4 afterwards ( aka -attack ).
But that's too much to achieve the goal. All you really want is to start attacking and stop attacking right after. As i said above, if either one of the commands ( +attack, +jump or whatever ) is bound to the mousewheel, the game writes the value 6 to the memory address. This will press the button once, simulating the release of the key ( -command ) for you. This is really all you need, just write 6 to the memory address and you're fine.
If you want to do it exactly how the game is doing it, you should use IVEngineClient->ExecuteClientCmd( const char* Command )ⓘ and issue a +attack and a -attack console command. It should work without using the key number right after, but if you want to do it like the game does, you'd have to use the key number aswell.
Thanks, Wasser, but already i solve my problem))
solved n closed