Raised This Month: $32 Target: $400
 8% 

Left 4 Dead 2 - CreateSurvivorBot


Post New Thread Reply   
 
Thread Tools Display Modes
Spirit_12
Veteran Member
Join Date: Dec 2012
Location: Toronto, CA
Old 12-18-2020 , 03:16   Re: Re: 左 4 死 2 - 创建幸存者机器人
Reply With Quote #11

Quote:
Originally Posted by microleo View Post
IF you build l4d2_multislots.smx. You'll know why I wrote this extension, i don't think that this simple.
I've ran a extended slot server for years. I have my own solutions, however if you feel like you need something specific then use Dhooks Detour. The code would be simpler and it would be much easier to maintain.
__________________
Spirit_12 is offline
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 12-21-2020 , 17:42   Re: Left 4 Dead 2 - CreateSurvivorBot
Reply With Quote #12

hi, microleo!

Did you compile an extension directly from VS?

Quote:
Can't open include file: IExtensionSys.h: No such file or directory, (compiling source file ..\extension.cpp) C:\dev\sm\ExtensionSrc\msvc12\Extension.vcxpr oj C:\dev\sm\ExtensionSrc\sdk\smsdk_ext.h 41
Can't open include file: IExtensionSys.h: No such file or directory, (compiling source file ..\sdk\smsdk_ext.cpp) C:\dev\sm\ExtensionSrc\msvc12\Extension.vcxpr oj c:\dev\sm\extensionsrc\sdk\smsdk_ext.h 41
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
Dragokas is offline
microleo
Junior Member
Join Date: Dec 2015
Old 12-21-2020 , 20:48   Re: Left 4 Dead 2 - CreateSurvivorBot
Reply With Quote #13

Quote:
Originally Posted by Dragokas View Post
hi, microleo!

Did you compile an extension directly from VS?

check your vs options:
1. Debug-left 4 dead 2 / Release-left 4 dead2
2. check Project Property (C/C++)->(General)->(Include Directories):
..;
..\sdk;
$(SOURCEMOD)\public;
$(MMSOURCE)\core;
$(MMSOURCE)\core\sourcehook;
$(SOURCEPAWN)\include;
$(AMTL);
$(AMTL)\amtl;
$(HL2SDKL4D2)\public;
$(HL2SDKL4D2)\public\engine;
$(HL2SDKL4D2)\public\game\server;
$(HL2SDKL4D2)\public\tier0;
$(HL2SDKL4D2)\public\tier1;

3.make sure that sdk are installed

Last edited by microleo; 12-21-2020 at 20:56.
microleo is offline
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 12-23-2020 , 02:01   Re: Left 4 Dead 2 - CreateSurvivorBot
Reply With Quote #14

Thank you. That works. I had to manually set up environment variables.
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
Dragokas is offline
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 12-23-2020 , 02:34   Re: Left 4 Dead 2 - CreateSurvivorBot
Reply With Quote #15

microleo, I saw, you provided Linux signatures as well.
Do you have makefile script?

I'm receiving:
Code:
In file included from extension.cpp:34:0:
FunctionType.h:5:26: error: expected ‘)’ before ‘*’ token
 typedef bool (__thiscall *tagHandleCommand_JoinTeam)(CBaseEntity *_pPlayerEntity, int _TeamIndex, int _iSurvivorCharacter, bool _bForcedJoinSurvivor);
                          ^
FunctionType.h:6:1: error: ‘tagHandleCommand_JoinTeam’ does not name a type
 tagHandleCommand_JoinTeam fHandleCommand_JoinTeam = 0;
 ^~~~~~~~~~~~~~~~~~~~~~~~~
FunctionType.h:13:27: error: expected ‘)’ before ‘*’ token
 typedef void* (__thiscall *tagCTerrorPlayerRoundRespawn)(CBaseEntity* _pPlayerEntity);
                           ^
FunctionType.h:13:27: error: expected initializer before ‘*’ token
FunctionType.h:14:1: error: ‘tagCTerrorPlayerRoundRespawn’ does not name a type
 tagCTerrorPlayerRoundRespawn fCTerrorPlayerRoundRespawn = 0;
 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
Isn't it require __cdecl CC ?
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
Dragokas is offline
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 12-23-2020 , 12:43   Re: Left 4 Dead 2 - CreateSurvivorBot
Reply With Quote #16

Made a direct port (without extension).
Only difference - HandleCommand_JoinTeam is replaced by ChangeClientTeam(). I think, it's the same.
Added L4D1 support.
Attached Files
File Type: zip CreateSurvivorBot.zip (12.0 KB, 5555 views)
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]

Last edited by Dragokas; 12-23-2020 at 12:45.
Dragokas is offline
Ein
New Member
Join Date: May 2020
Old 01-06-2021 , 09:06   Re: Left 4 Dead 2 - CreateSurvivorBot
Reply With Quote #17

Does it work on the listen server?
Ein is offline
wyxls
Junior Member
Join Date: Jul 2010
Location: China
Old 04-15-2021 , 01:44   Re: Left 4 Dead 2 - CreateSurvivorBot
Reply With Quote #18

Quote:
Originally Posted by Dragokas View Post
Made a direct port (without extension).
Only difference - HandleCommand_JoinTeam is replaced by ChangeClientTeam(). I think, it's the same.
Added L4D1 support.
It's a bit confusing. Should I load both l4d and l4d2 .smx files if I'm running L4D2 server?
wyxls is offline
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 04-15-2021 , 06:04   Re: Left 4 Dead 2 - CreateSurvivorBot
Reply With Quote #19

Depends on what do you want.

l4d_CreateSurvivorBot.sp - provides CreateSurvivorBot() forward.
l4d2_CreateSurvivorBot_Test.sp - provides "sm_newbot" command to use those forward. So you'll have to have both plugins.
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
Dragokas is offline
wyxls
Junior Member
Join Date: Jul 2010
Location: China
Old 04-15-2021 , 06:24   Re: Left 4 Dead 2 - CreateSurvivorBot
Reply With Quote #20

Quote:
Originally Posted by Dragokas View Post
Depends on what do you want.

l4d_CreateSurvivorBot.sp - provides CreateSurvivorBot() forward.
l4d2_CreateSurvivorBot_Test.sp - provides "sm_newbot" command to use those forward. So you'll have to have both plugins.
There's another problem. If I just load "l4d2_CreateSurvivorBot_Test", the console report that "NextBotCreatePlayerBotSurvivorBot" could not found.( I've put gamedata file into the right folder.)

Loading both of them or just "l4d_CreateSurvivorBot" seems fine.
wyxls is offline
Reply



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 13:56.


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