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

[CS:GO] StatTrak Knives 1.2.0


Post New Thread Reply   
 
Thread Tools Display Modes
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old 06-03-2015 , 17:23   Re: [CS:GO] Knives 1.0.1
Reply With Quote #31

Quote:
Originally Posted by enHanced View Post
Same here.. and getting this error:
PHP Code:
L 06/03/2015 15:37:38: [SMNative "DHookSetReturn" reportedInvalid entity index passed for return value
L 06
/03/2015 15:37:38: [SMDisplaying call stack trace for plugin "knives.smx":
L 06/03/2015 15:37:38: [SM]   [0]  Line 152knives.sp::OnGiveNamedItem()
L 06/03/2015 15:37:38: [SMNative "DHookSetReturn" reportedInvalid entity index passed for return value
L 06
/03/2015 15:37:38: [SMDisplaying call stack trace for plugin "knives.smx":
L 06/03/2015 15:37:38: [SM]   [0]  Line 152knives.sp::OnGiveNamedItem() 
hope this helps @Neuro Toxin
In one of my last attempts to force the hook to block I made this error.

I'll fix this after work tonight.

Edit: If someone wanted to try. Put 0 as the arg on line 152 or comment it out
__________________

Last edited by Neuro Toxin; 06-03-2015 at 17:25.
Neuro Toxin is offline
SM9
Veteran Member
Join Date: Sep 2013
Location: United Kingdom
Old 06-03-2015 , 20:26   Re: [CS:GO] Knives 1.0.1
Reply With Quote #32

You could probably do something with mp_t_default_melee "" and mp_ct_default_melee "" which will make the game not give a knife when the player spawns, then fire your own function to give the default knife if they have not selected a custom one else fire the custom knife function.

You might even be able to Send the convar to the client instead of changing it on the server. (Not too familiar with DHooks) but I believe thats what admin-all-spec does.

Also ive noticed changing the following netprop : SetEntProp(weapon, Prop_Send, "m_iItemIDLow", -1); is causing clients games to crash. You would want to use a data timer with a delay of 0.1 to set back the original value after changing it. I have my own custom and currently private Weapon Skins & Knife chooser plugin with mysql support. And the only way I have been able to prevent the crashes is by avoiding removing a clients knife (Its most definately the removing of the knife that causes the crash), which means changing the netprop value for the item definition index, the side effect of this is the Falchion and the Butterfly knife animations are buggy and they will flicker. You have an interesting method though which is definitely promising but just needs a bit of work.

Another way you could block the original knife is by using
SDKHook_WeaponEquip but I definitely think the safest way would be to use the cvars provided by the game itself.

I also believe the reason the original knife is being dropped to the ground is because DHooks is giving the custom knife before the game has a chance to give the original knife and then the game tries to give the original knife afterwards but it can't because the knife slot is not empty, so it just drops to the ground.

Ill try and implement a few fixes tomorrow and post a copy of it. Keep up the good work

Last edited by SM9; 06-03-2015 at 20:33.
SM9 is offline
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old 06-03-2015 , 21:14   Re: [CS:GO] Knives 1.0.1
Reply With Quote #33

Great advise!
__________________
Neuro Toxin is offline
eZ@AG
Junior Member
Join Date: May 2015
Old 06-03-2015 , 22:30   Re: [CS:GO] Knives 1.0.1
Reply With Quote #34

I just had a server crash with the following error

Quote:
L 06/03/2015 - 21:07:06: Info (map "am_nuke_ramp") (file "errors_20150603.log")
L 06/03/2015 - 21:07:06: [SM] Native "DHookSetReturn" reported: Invalid entity index passed for return value
L 06/03/2015 - 21:07:06: [SM] Displaying call stack trace for plugin "knives.smx":
L 06/03/2015 - 21:07:06: [SM] [0] Line 152, knives.sp::OnGiveNamedItem()
Edit: might i also add that this error was repeating for about 1400 lines

Last edited by eZ@AG; 06-03-2015 at 22:35.
eZ@AG is offline
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old 06-03-2015 , 23:04   Re: [CS:GO] Knives 1.0.1
Reply With Quote #35

Plugin list?
__________________
Neuro Toxin is offline
eZ@AG
Junior Member
Join Date: May 2015
Old 06-04-2015 , 01:09   Re: [CS:GO] Knives 1.0.1
Reply With Quote #36

It might not have been the plugin itself, but the recent csgo update.

SourceMod 1.7.2-dev+5203, by AlliedModders LLC

Plugin list
"Admin File Reader" (1.7.2-dev+5203) by AlliedModders LLC
"Admin Help" (1.7.2-dev+5203) by AlliedModders LLC
"Admin Menu" (1.7.2-dev+5203) by AlliedModders LLC
"Anti-Flood" (1.7.2-dev+5203) by AlliedModders LLC
"Ban disconnected players" (1.04) by mad_hamster
"Basic Ban Commands" (1.7.2-dev+5203) by AlliedModders LLC
"Basic Chat" (1.7.2-dev+5203) by AlliedModders LLC
"Basic Comm Control" (1.7.2-dev+5203) by AlliedModders LLC
"Basic Commands" (1.7.2-dev+5203) by AlliedModders LLC
"Basic Info Triggers" (1.7.2-dev+5203) by AlliedModders LLC
"Basic Votes" (1.7.2-dev+5203) by AlliedModders LLC
"Chat Colors CSGO" (1.2) by Phoenix - Феникс
"Client Preferences" (1.7.2-dev+5203) by AlliedModders LLC
"CS:GO Admin ESP" (2.1) by Root
"Fun Commands" (1.7.2-dev+5203) by AlliedModders LLC
"Fun Votes" (1.7.2-dev+5203) by AlliedModders LLC
"HLstatsX CE Ingame Plugin" (1.6.19) by psychonic
"MapChooser" (1.7.1-dev+5167) by AlliedModders LLC
"Open URL MOTD" (1.1) by CAPS LOCK FUCK YEAH
"CS:GO Multi1v1" (1.0.0) by splewis
"CS:GO Multi1v1: flashbangs addon" (1.0.0) by splewis
"CS:GO Multi1v1: knife round addon" (1.0.0) by splewis
"Negev Rounds" (1.0) by Headline
"Nextmap" (1.7.2-dev+5203) by AlliedModders LLC
"Map Nominations" (1.7.1-dev+5167) by AlliedModders LLC
"P90 Rounds" (1.0.0) by Headline
"Player Commands" (1.7.2-dev+5203) by AlliedModders LLC
"Reserved Slots" (1.7.2-dev+5203) by AlliedModders LLC
"Rock The Vote" (1.7.1-dev+5167) by AlliedModders LLC
"CS:GO Multi1v1: ssg08 round addon" (1.0.0) by Headline
"Self-Mute" (1.0) by Otokiru
"Server Advertisement" (1.3) by ESK0
"Simple Chat Processor (Redux)" (1.1.5) by Simple Plugins, Mini
"SourceMod Anti-Cheat" (0.8.5.2) by SMAC Development Team
"SMAC Aimbot Detector" (0.8.5.2) by SMAC Development Team
"SMAC AutoTrigger Detector" (0.8.5.2) by SMAC Development Team
"SMAC Client Protection" (0.8.5.2) by SMAC Development Team
"SMAC Command Monitor" (0.8.5.2) by SMAC Development Team
"SMAC ConVar Checker" (0.8.5.2) by SMAC Development Team
"SMAC ESEA Global Banlist" (0.8.5.2) by SMAC Development Team
"SMAC Eye Angle Test" (0.8.5.2) by SMAC Development Team
"SMAC Rcon Locker" (0.8.5.2) by SMAC Development Team
"SMAC Anti-Speedhack" (0.8.5.2) by SMAC Development Team
"SMAC Spinhack Detector" (0.8.5.2) by SMAC Development Team
"SMAC Anti-Wallhack" (0.8.5.2) by SMAC Development Team
"Sound Commands" (1.7.2-dev+5203) by AlliedModders LLC
"Updater" (1.2.2) by GoD-Tony
"Very Basic High Ping Kicker" (1.4) by msleeper
"Web Shortcuts CS:GO version" (2.2) by Franc1sco franug and James "sslice" Gray
"Zeus Round" (1.0.0) by Headline
eZ@AG is offline
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old 06-04-2015 , 05:40   Re: [CS:GO] Knives 1.0.2
Reply With Quote #37

Quote:
Version 1.0.2
* Fixed bug in GiveNamedItem prehook
__________________

Last edited by Neuro Toxin; 06-04-2015 at 05:40.
Neuro Toxin is offline
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old 06-04-2015 , 06:03   Re: [CS:GO] Knives 1.0.1
Reply With Quote #38

Quote:
Originally Posted by xCoderx View Post
You could probably do something with mp_t_default_melee "" and mp_ct_default_melee "" which will make the game not give a knife when the player spawns, then fire your own function to give the default knife if they have not selected a custom one else fire the custom knife function.
The original idea I want to come back to once I nut out what I'm doing wrong with Dr!fter:- is to change the classname before GiveNamedItem function calls internally. This way it's purely hooked before any items are spawned where I'm forcing in the classname based on your !knife selection.

Ps:- This is fixed now as the error reported by eZ@AG was causing the hook to not block the old classname being spawned. Note: This is a dirty fix (imo) until I can override the classname parameter.

Quote:
Originally Posted by xCoderx View Post
Also ive noticed changing the following netprop : SetEntProp(weapon, Prop_Send, "m_iItemIDLow", -1); is causing clients games to crash. You would want to use a data timer with a delay of 0.1 to set back the original value after changing it.
Tbh, This way is so early in the creation of the named item, that it has not caused any crashes for me what so ever. I also run a very advanced paintkit plugin on all my servers and have not experienced any client crashes since i moved to using -1 instead of 0;

I'm also unsure how game clients will react to another plugin setting the fallback netprops after this plugin disables them. It may be worth adding a forward if I start getting reports of unexpected behavior or client crashes.

If you have actually got crashes when testing this, and are not going off assumptive knowledge, please let me know and try disabling any paintkit plugins that are altering fallback netprops and see if the crashes still occur.

Quote:
Originally Posted by xCoderx View Post
I also believe the reason the original knife is being dropped to the ground is because DHooks is giving the custom knife before the game has a chance to give the original knife and then the game tries to give the original knife afterwards but it can't because the knife slot is not empty, so it just drops to the ground.
This was purely the reported bug as it was stopping the hook from being blocked, meaning the knife being blocked was getting created.

To clarify, this plugin as of version 1.0.2, completely blocks the first call to GiveNamedItem if the classname for the knife being spawned doesn't match the classname of the players knife selection. If a plugin calls GivePlayerItem it should return -1 as the entity isn't created if the wrong classname was parsed as a parameter. If the classname was right, everything continues on it's marry old way.
__________________
Neuro Toxin is offline
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old 06-06-2015 , 20:43   Re: [CS:GO] Knives 1.0.2
Reply With Quote #39

I'm about to build MySQL support for selection and weapon kill counters.

I take it that no response since the last update is good news and no one is having issues.
__________________
Neuro Toxin is offline
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old 06-06-2015 , 23:36   Re: [CS:GO] StatTrak Knives 1.1.0
Reply With Quote #40

Quote:
Version 1.1.0
* Added MySQL support for preference saving
* Added StatTrak counters
__________________

Last edited by Neuro Toxin; 06-06-2015 at 23:36.
Neuro Toxin 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:26.


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