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

Crash with CS_OnCSWeaponDrop


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
_EverGreen_
Junior Member
Join Date: Feb 2021
Old 02-05-2021 , 16:08   Crash with CS_OnCSWeaponDrop
Reply With Quote #1

Hi guys.
This is my first post and sorry if i on a fault.

I need to use this CS_OnCSWeaponDrop, but when i implement on my server and this change map to any aim_/fy_ (or any map with weapon on floor) this causes server crash.

Any form of replacing CS_OnCSWeaponDrop for another one? Thanks!!!

Last edited by asherkin; 02-10-2021 at 11:20.
_EverGreen_ is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 02-05-2021 , 18:00   Re: CS_OnCSWeaponDrop not work?
Reply With Quote #2

Quote:
Originally Posted by _EverGreen_ View Post
Hi guys.
This is my first post and sorry if i on a fault.

I need to use this CS_OnCSWeaponDrop, but when i implement on my server and this change map to any aim_/fy_ (or any map with weapon on floor) this causes server crash.

Any form of replacing CS_OnCSWeaponDrop for another one? Thanks!!!

Can you show your code ?
Tell us example map (giving link more better)

*edit
Is server Windows or Linux ?
Is dedicated server SRCDS ? And not in-game "create server"

Last edited by Bacardi; 02-05-2021 at 18:06.
Bacardi is offline
_EverGreen_
Junior Member
Join Date: Feb 2021
Old 02-05-2021 , 19:35   Re: CS_OnCSWeaponDrop not work?
Reply With Quote #3

Hi Bacardi and thanks for quest!!!

Sorry, i omitted lot of info

Server is SRCDS running on a Windows x64.

The code is the next:

PHP Code:
public Action:CS_OnCSWeaponDrop(iClientiWeaponIndex)
{
    
decl String:szClassName[32];
    
GetEdictClassname(iWeaponIndexszClassNamesizeof(szClassName));
    
    if(
StrEqual(szClassName"weapon_c4"false))
    {
        
g_iC4Ent iWeaponIndex;
    }

Sorry if not show formatted (i check PHP code, i hope this correct).

If you add the code on any plugin, server will crash on maps like $2000$ or any where map with weapon on floor at map start.


PS: This fragment of code is from "Dropped Bomb Defuse" plugin. The author is "SavSin"

Last edited by _EverGreen_; 02-05-2021 at 19:38.
_EverGreen_ is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 02-05-2021 , 19:38   Re: CS_OnCSWeaponDrop not work?
Reply With Quote #4

You could also mention more info from server console:
version
meta version
sm version
__________________
Do not Private Message @me
Bacardi is offline
_EverGreen_
Junior Member
Join Date: Feb 2021
Old 02-05-2021 , 19:39   Re: CS_OnCSWeaponDrop not work?
Reply With Quote #5

Quote:
Originally Posted by Bacardi View Post
You could also mention more info from server console:
version
meta version
sm version
meta version
Metamod:Source Version Information
Metamod:Source version 1.11.0-dev+1144
Plugin interface version: 16:14
SourceHook version: 5:5
Loaded As: Valve Server Plugin
Compiled on: Aug 25 2020 06:54:21
Built from: https://github.com/alliedmodders/met...commit/7341116
Build ID: 1144:7341116
http://www.metamodsource.net/

------------------

sm version
SourceMod Version Information:
SourceMod Version: 1.10.0.6502
SourcePawn Engine: 1.10.0.6502, jit-x86 (build 1.10.0.6502)
SourcePawn API: v1 = 5, v2 = 12
Compiled on: Dec 18 2020 11:19:18
Built from: https://github.com/alliedmodders/sou...ommit/617fb77e
Build ID: 6502:617fb77e
http://www.sourcemod.net/


EDIT:

version
Build Label: 5394425 # Uniquely identifies each build
Network PatchVersion: 5394425 # Determines client and server compatibility
Protocol version: 24 # High level network protocol version
Server version: 5394425
Server AppID: 232330

Last edited by _EverGreen_; 02-05-2021 at 19:40.
_EverGreen_ is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 02-06-2021 , 04:36   Re: CS_OnCSWeaponDrop not work?
Reply With Quote #6

Tested using Windows10
Spoiler


I tried maps
https://gamebanana.com/maps/211541
https://gamebanana.com/maps/212282
https://gamebanana.com/maps/163792

I used that code snip and spawned weapon_c4

No crash, no problems.


Just to be sure:
- Use SteamCMD to download SRCDS.
- Use validate parameter in update script to fix files (app_update 232330 validate)
- Or uninstall all other SM plugins and try again.
- Try normal map (de_dust, cs_office)
Bacardi is offline
_EverGreen_
Junior Member
Join Date: Feb 2021
Old 02-06-2021 , 09:25   Re: CS_OnCSWeaponDrop not work?
Reply With Quote #7

Quote:
Originally Posted by Bacardi View Post
Tested using Windows10
Spoiler


I tried maps
https://gamebanana.com/maps/211541
https://gamebanana.com/maps/212282
https://gamebanana.com/maps/163792

I used that code snip and spawned weapon_c4

No crash, no problems.


Just to be sure:
- Use SteamCMD to download SRCDS.
- Use validate parameter in update script to fix files (app_update 232330 validate)
- Or uninstall all other SM plugins and try again.
- Try normal map (de_dust, cs_office)

I already downloaded SRCDS via SteamCMD.
I missed other thing: SRCDS is running CS:S.
I already tried unload all other plugins. I delete addons / cfg folders and reinstall only metamod /sourcemod and "Dropped bomb defuse" plugin, i tried on bomb_defuse maps and works fine, on other map with not bomb_defuse, works fine except on maps like $2000$ aim_akcolt etc.


I got to try your suggestions!!!

Last edited by _EverGreen_; 02-06-2021 at 09:26.
_EverGreen_ is offline
_EverGreen_
Junior Member
Join Date: Feb 2021
Old 02-06-2021 , 10:00   Re: CS_OnCSWeaponDrop not work?
Reply With Quote #8

Quote:
Originally Posted by Bacardi View Post
Tested using Windows10
Spoiler


I tried maps
https://gamebanana.com/maps/211541
https://gamebanana.com/maps/212282
https://gamebanana.com/maps/163792

I used that code snip and spawned weapon_c4

No crash, no problems.


Just to be sure:
- Use SteamCMD to download SRCDS.
- Use validate parameter in update script to fix files (app_update 232330 validate)
- Or uninstall all other SM plugins and try again.
- Try normal map (de_dust, cs_office)
Ok, already try your suggestions, i update the server with the steamCMD command.


Server still crash, but i missed a little info, crash when add BOTs.

for example: when start server, next send (if no BOT) bot_join_after_player 0; bot_quota 20 server crashes at random time. At a 20" or less, server will crash. I noted apparently crash on player/BOT spawn, because crashes after a lot of "CT bot spawned outside of a buy zone (-858, 13, -17".

I submit plugin .sp file if you like to check
Attached Files
File Type: sp Get Plugin or Get Source (DropBombDefuse.sp - 141 views - 14.4 KB)

Last edited by _EverGreen_; 02-06-2021 at 11:20.
_EverGreen_ is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 02-08-2021 , 05:20   Re: CS_OnCSWeaponDrop not work?
Reply With Quote #9

Ok, it take long time even to get first crash.
But suddenly it start crash more often when there are more bots (25) and in regular map de_dust2. Take 2 ~ 4 rounds and suddenly it crash (player death ?).

Have to look it more when I have time.


*edit
Added Accelerator on test server.

*edit
MDAE-XBG6-Y437
Attached Files
File Type: zip dumps.zip (38.8 KB, 75 views)

Last edited by Bacardi; 02-08-2021 at 05:31.
Bacardi is offline
_EverGreen_
Junior Member
Join Date: Feb 2021
Old 02-08-2021 , 11:08   Re: CS_OnCSWeaponDrop not work?
Reply With Quote #10

Quote:
Originally Posted by Bacardi View Post
Ok, it take long time even to get first crash.
But suddenly it start crash more often when there are more bots (25) and in regular map de_dust2. Take 2 ~ 4 rounds and suddenly it crash (player death ?).

Have to look it more when I have time.


*edit
Added Accelerator on test server.

*edit
MDAE-XBG6-Y437
I used sv_cheats 1; host_timescale 3 to accelerate. But isn't necessary on $ 2000 $ map, if you set [B] srcds.exe -game cstrike -console + map $ 2000 $ [/ B] in command-line and in [B] server.cfg [/ B]you add [B ] bot_join_after_player 0 [/ B] and [B] bot_quota 20 [/ B] when start server, crash is immediatly on most cases.

Sorry but im very new in sourcemod programming, and i don't know about this "MDAE-XBG6-Y437" and debugger tools. An reading valves developer page i read what -debug option is only for Linux/Unix, not for windows.

EDIT: I add bsp map file i use on server. I suspect the problem is on player respawn(not player death) because crash is really fast 5 seconds or less, after server says VAC secure mode is activated.
Attached Files
File Type: zip $2000$.zip (552.7 KB, 90 views)

Last edited by _EverGreen_; 02-08-2021 at 11:17.
_EverGreen_ 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 00:10.


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