Raised This Month: $12 Target: $400
 3% 

[TF2] Give Bots Weapons (04.01.2023)


Post New Thread Reply   
 
Thread Tools Display Modes
Cyfun
New Member
Join Date: Dec 2020
Old 10-31-2021 , 18:01   Re: [TF2] Give Bots Weapons (10.10.2021)
Reply With Quote #101

Hi, I'm tryna download the latest version of the plugin from the first post. But when I click the linky, I get an error:

Quote:
Plugin failed to compile! Please try contacting the author.
SourcePawn Compiler 1.8.0.5969
Copyright (c) 1997-2006 ITB CompuPhase
Copyright (c) 2004-2015 AlliedModders LLC

191793.attach(89) : error 167: cannot use delete, integers do not have destructors

2 Errors.
Cyfun is offline
PC Gamer
Veteran Member
Join Date: Mar 2014
Old 10-31-2021 , 22:55   Re: [TF2] Give Bots Weapons (10.10.2021)
Reply With Quote #102

The source code in the original post is fine. I suspect that the code is having issues with version 1.8 of the online compiler which is used when you click on 'get plugin'. It compiled fine locally for me just now using version 1.10.

I've attached the unedited compiled version of the original post here for you in case you don't want to compile it yourself.
Attached Files
File Type: sp Get Plugin or Get Source (GiveBotsWeapons.sp - 111 views - 36.6 KB)
File Type: smx givebotsweapons.smx (15.0 KB, 68 views)
File Type: txt give.bots.weapons.txt (262 Bytes, 89 views)
PC Gamer is offline
luki1412
Veteran Member
Join Date: Oct 2008
Location: OnPluginStart()
Old 11-01-2021 , 09:48   Re: [TF2] Give Bots Weapons (10.10.2021)
Reply With Quote #103

Quote:
Originally Posted by PC Gamer View Post
The source code in the original post is fine. I suspect that the code is having issues with version 1.8 of the online compiler which is used when you click on 'get plugin'. It compiled fine locally for me just now using version 1.10.

I've attached the unedited compiled version of the original post here for you in case you don't want to compile it yourself.
I increased the compiler version needed to 1.10 and now it works fine.
__________________
luki1412 is offline
Dragonisser
AlliedModders Donor
Join Date: Jan 2014
Location: Germany
Old 11-16-2021 , 14:32   Re: [TF2] Give Bots Weapons (10.10.2021)
Reply With Quote #104

Seems to be broken after the update today. Even tho the gamedata has changed, the offsets are still the same but it doesnt give any weaposn or cosmetics to the bots.
Dragonisser is offline
luki1412
Veteran Member
Join Date: Oct 2008
Location: OnPluginStart()
Old 11-18-2021 , 09:26   Re: [TF2] Give Bots Weapons (10.10.2021)
Reply With Quote #105

Quote:
Originally Posted by Dragonisser View Post
Seems to be broken after the update today. Even tho the gamedata has changed, the offsets are still the same but it doesnt give any weaposn or cosmetics to the bots.
Redownload the gamedata
__________________
luki1412 is offline
Dragonisser
AlliedModders Donor
Join Date: Jan 2014
Location: Germany
Old 11-18-2021 , 14:59   Re: [TF2] Give Bots Weapons (10.10.2021)
Reply With Quote #106

Quote:
Originally Posted by luki1412 View Post
Redownload the gamedata

I checked via Asherkins offset finder and it still reported the old values.
https://asherkin.github.io/vtable/

Spoke to asherkin. They said i should upload the server.so next time myself, seems to work better.

Last edited by Dragonisser; 11-18-2021 at 15:18.
Dragonisser is offline
luki1412
Veteran Member
Join Date: Oct 2008
Location: OnPluginStart()
Old 11-18-2021 , 16:51   Re: [TF2] Give Bots Weapons (10.10.2021)
Reply With Quote #107

Quote:
Originally Posted by Dragonisser View Post
I checked via Asherkins offset finder and it still reported the old values.
https://asherkin.github.io/vtable/

Spoke to asherkin. They said i should upload the server.so next time myself, seems to work better.
Yeah the server file was old but you can upload your own.
__________________
luki1412 is offline
Markus_Wyand
Junior Member
Join Date: Aug 2022
Old 08-28-2022 , 17:34   Re: [TF2] Give Bots Weapons (10.10.2021)
Reply With Quote #108

Hello, i am a user of this plugin and i recently having issues with the bots stopping to use certain weapons.
FOR EXAMPLE: Sniper gets their primary weapon removed and can go smg/melee only. Then when i force that bot to change class, it still has its primary weapon slot removed.
Any ideas why is this?
PS: i downloaded the .sp file and added some weapons that weren't there like the Buff Banner and Jarate, maybe that's the cause? I saw no errors in the compiling process...

EDIT: Forgot to add something, the problem isn't instant, the bots use all weapons fine for a couple of minutes, but after 10 mins or something they start missing weapon slots.

Last edited by Markus_Wyand; 08-28-2022 at 17:37.
Markus_Wyand is offline
luki1412
Veteran Member
Join Date: Oct 2008
Location: OnPluginStart()
Old 08-30-2022 , 03:21   Re: [TF2] Give Bots Weapons (10.10.2021)
Reply With Quote #109

Quote:
Originally Posted by Markus_Wyand View Post
Hello, i am a user of this plugin and i recently having issues with the bots stopping to use certain weapons.
FOR EXAMPLE: Sniper gets their primary weapon removed and can go smg/melee only. Then when i force that bot to change class, it still has its primary weapon slot removed.
Any ideas why is this?
PS: i downloaded the .sp file and added some weapons that weren't there like the Buff Banner and Jarate, maybe that's the cause? I saw no errors in the compiling process...

EDIT: Forgot to add something, the problem isn't instant, the bots use all weapons fine for a couple of minutes, but after 10 mins or something they start missing weapon slots.
Is your game data up to date? Do you have anything in the logs?
__________________
luki1412 is offline
Markus_Wyand
Junior Member
Join Date: Aug 2022
Old 08-30-2022 , 21:05   Re: [TF2] Give Bots Weapons (10.10.2021)
Reply With Quote #110

Oh, forget about it, i actually found a work around it to make it work properly.
I just had to experiment and tweak the code a little.
**ORIGINAL BY YOU**:
case TFClass_Soldier:
{
int rnd = GetRandomUInt(0,3);
if(rnd != 0)
{
TF2_RemoveWeaponSlot(client, 0);
}
switch (rnd)
{
case 1:
{
CreateWeapon(client, "tf_weapon_rocketlauncher_directhit", 127, 1);
}
**WHAT I DID**:
case TFClass_Soldier:
{
int rnd = GetRandomUInt(1,3);
{
switch (rnd)
{
case 1:
{
TF2_RemoveWeaponSlot(client, 0);
CreateWeapon(client, "tf_weapon_rocketlauncher", 1; **<-- this supposed to be 18**
}

Basically removed the " if(rnd != 0) ", changed the order of some stuff, forced the bot to pick from 1,3 instead of 0,3 and add the Default Weapon (in this case the rocket launcher [18]) for the bot to choose it.
This way they are forced to pick one of the 3 weapons, and dont go A pose or missing weapons anymore.
Works like a charm. But thanks for answering, didn't expect to get attention since the last reply was 1 year ago...
EDIT: The thing works better but its still flawed :C

Last edited by Markus_Wyand; 08-31-2022 at 18:39.
Markus_Wyand is offline
Reply


Thread Tools
Display Modes

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 09:09.


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