Raised This Month: $ Target: $400
 0% 

KnifeFight


Post New Thread Reply   
 
Thread Tools Display Modes
erikxcore
Member
Join Date: Apr 2013
Old 08-30-2013 , 20:50   Re: KnifeFight
Reply With Quote #551

Hey guys,

So, I was running the last working copy of KnifeFight.smx on 1.5.1-hg3913 of SourceMod/1.10.0-hg857 of Metamod:Source prior to the update.

Of course after the big update it would crash immediately when players agreed to fight. I found a few topics here and there pointing out the August 14th update broke the GivePlayerItem method (if I remember right) and any references to CS:S guns in weapon lists would also cause crashes.

I ended up opening up the last knifefight.sp file and modifying the weapon list based on GunGame's latest list (with added grenades) and changed the two files that were not found on the beacons - at this point I could get the count down to initiate and strip all player weapons; but it would still crash once it would attempt to give players the knife.

I ended up searching a little more and turns out you need to update SourceMod - I'm currently on 1.5.1-hg3914 for SM and 1.10.1-hg863 for MM and I can report the mod is working.

Now, I can't confirm if just updating SM/MM will fix everyone's CS:GO issues, but attached is my working and modified plugin - debugging is enabled since I *literally* just figured it out. Attached is (I think!) the .sp file I used and the .smx plugin - the .sp file shouldn't compile because it requires that whole knifefight folder in /Scripts/.

If anyone would like I could go hunting for all the topics I waded through if anyone wants to seriously recode this plugin as I'm simply a web developer, nowhere near experienced in SM plugins. Apologies if I'm attaching this stuff wrong!

Cheers.
Attached Files
File Type: sp Get Plugin or Get Source (knifefight.sp - 231 views - 53.0 KB)
File Type: smx knifefight.smx (27.5 KB, 227 views)
erikxcore is offline
gamemann
Veteran Member
Join Date: Sep 2009
Location: Mullica Hill, New Jersey
Old 09-01-2013 , 01:22   Re: KnifeFight
Reply With Quote #552

Quote:
Originally Posted by erikxcore View Post
Hey guys,

So, I was running the last working copy of KnifeFight.smx on 1.5.1-hg3913 of SourceMod/1.10.0-hg857 of Metamod:Source prior to the update.

Of course after the big update it would crash immediately when players agreed to fight. I found a few topics here and there pointing out the August 14th update broke the GivePlayerItem method (if I remember right) and any references to CS:S guns in weapon lists would also cause crashes.

I ended up opening up the last knifefight.sp file and modifying the weapon list based on GunGame's latest list (with added grenades) and changed the two files that were not found on the beacons - at this point I could get the count down to initiate and strip all player weapons; but it would still crash once it would attempt to give players the knife.

I ended up searching a little more and turns out you need to update SourceMod - I'm currently on 1.5.1-hg3914 for SM and 1.10.1-hg863 for MM and I can report the mod is working.

Now, I can't confirm if just updating SM/MM will fix everyone's CS:GO issues, but attached is my working and modified plugin - debugging is enabled since I *literally* just figured it out. Attached is (I think!) the .sp file I used and the .smx plugin - the .sp file shouldn't compile because it requires that whole knifefight folder in /Scripts/.

If anyone would like I could go hunting for all the topics I waded through if anyone wants to seriously recode this plugin as I'm simply a web developer, nowhere near experienced in SM plugins. Apologies if I'm attaching this stuff wrong!

Cheers.
Only problem I have with this plugin is when I try to take over a bot when it's a bot vs player or bot vs bot fight, it crashes the server(On CS:GO of course).
I tried commenting out a lot of the code but can't find out what crashes it.
I may look into it more later.
I also have the latest versions of SourceMod and MetaMod.
Thanks,
Gamemann
__________________
Software/network engineer. I often work on a neat project called The Modding Community.

Check out my GitHub here!
gamemann is offline
Send a message via Skype™ to gamemann
erikxcore
Member
Join Date: Apr 2013
Old 09-05-2013 , 16:48   Re: KnifeFight
Reply With Quote #553

Quote:
Originally Posted by gamemann View Post
Only problem I have with this plugin is when I try to take over a bot when it's a bot vs player or bot vs bot fight, it crashes the server(On CS:GO of course).
I tried commenting out a lot of the code but can't find out what crashes it.
I may look into it more later.
I also have the latest versions of SourceMod and MetaMod.
Thanks,
Gamemann
Yep, noticed this the other night when we were testing 1v1 (3 bots each side) - I know previously if you took over a bot after the bot accepted it would automatically die if you switched to it. Hmm..

Edit: Found this which determines if the bots will fight bots - I'm assuming if the bot fighting is not allowed it just returns void for the method and they're never presented the menus to accept, sort of a silly work around to just drop a return statement above the if but I'll give it a go:
if ( IsClientInGame(ctid) && IsPlayerAlive(ctid) && IsClientInGame(tid) && IsPlayerAlive(tid) )
{
if ( IsFakeClient(ctid) && IsFakeClient(tid) )
{
if ( !g_isBotFightAllowed )
{
return;
}
}

Last edited by erikxcore; 09-05-2013 at 16:55. Reason: More info.
erikxcore is offline
cyberlair
Junior Member
Join Date: Jun 2013
Old 09-09-2013 , 01:34   Re: KnifeFight
Reply With Quote #554

is there a fix for this yet?

have my server back up and running again but i cant even find the command to turn off bot control so that no one can crash the server.
cyberlair is offline
erikxcore
Member
Join Date: Apr 2013
Old 09-10-2013 , 09:28   Re: KnifeFight
Reply With Quote #555

Quote:
Originally Posted by cyberlair View Post
is there a fix for this yet?

have my server back up and running again but i cant even find the command to turn off bot control so that no one can crash the server.
I made a few tweaks that will default the bots to disagreeing, however the message box will still pop up to real players.

If someone becomes the bot the server will no longer crash, however, that player can not bring up !kfmenu to try and accept the past knife fight if he becomes the bot.

I'll probably have to tweak it a little more, but as it currently stands at least it works with real players.

Oh, and I added NB to the filename to signify no bot support. Regardless, I'm not really well versed in the Pawn language so all my tweaks are based on just applying this to regular programming knowledge - someone more experienced should be able to come in and clean up the plugin since it's been modified by who knows how many people.
Attached Files
File Type: sp Get Plugin or Get Source (knifefightNB.sp - 160 views - 53.1 KB)
File Type: smx knifefightNB.smx (27.5 KB, 167 views)
erikxcore is offline
cyberlair
Junior Member
Join Date: Jun 2013
Old 09-11-2013 , 20:13   Re: KnifeFight
Reply With Quote #556

Quote:
Originally Posted by erikxcore View Post
I made a few tweaks that will default the bots to disagreeing, however the message box will still pop up to real players.

If someone becomes the bot the server will no longer crash, however, that player can not bring up !kfmenu to try and accept the past knife fight if he becomes the bot.

I'll probably have to tweak it a little more, but as it currently stands at least it works with real players.

Oh, and I added NB to the filename to signify no bot support. Regardless, I'm not really well versed in the Pawn language so all my tweaks are based on just applying this to regular programming knowledge - someone more experienced should be able to come in and clean up the plugin since it's been modified by who knows how many people.

thanks alot for the fix.
cyberlair is offline
Blakes7
Senior Member
Join Date: Dec 2012
Location: New England
Old 09-12-2013 , 15:24   Re: KnifeFight
Reply With Quote #557

Arguably the Best MOD/Plugin for CS:Source ever!!!

Is there any chance you can add an "Accept" Sound Effect?
We get the "Chicken" sound when someone refuses... what about a Crowd "Cheering" when someone accepts? Or the Mad Max Chant of "Two Men Enter, One Man Leaves..." ;)

Also I think all Plugin "Architects" should have a PayPal plugin to "Accept" donations "Hooray!!"

Greatly Appreciated,

Capt.Blakes7
Blakes7 is offline
herpes
Member
Join Date: Oct 2010
Old 09-13-2013 , 01:11   Re: KnifeFight
Reply With Quote #558

Edit your background music's mp3 file for the knife fight to play that, then transition into the music.
herpes is offline
Blakes7
Senior Member
Join Date: Dec 2012
Location: New England
Old 09-13-2013 , 16:52   Re: KnifeFight
Reply With Quote #559

Quote:
Originally Posted by herpes View Post
Edit your background music's mp3 file for the knife fight to play that, then transition into the music.
Of course, tag the 2 together, did not think of that...cheers!
Blakes7 is offline
herpes
Member
Join Date: Oct 2010
Old 09-14-2013 , 12:11   Re: KnifeFight
Reply With Quote #560

Could we get a fix to incorporate the missing beacon animations? Srvmil had a solution here, but I don't think it got incorporated in your bit-fixed code and I would love it

https://forums.alliedmods.net/showpo...&postcount=543
herpes 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:50.


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