View Single Post
Senior Member
Join Date: Jun 2010
Location: 📦 CCSPlayer
Old 12-21-2017 , 13:32   Re: [CS:GO] PTaH - V1.0.8
Reply With Quote #106

Hey I was wondering if you had any idea on how to fix this issue.
We discussed it a little on steam.
This is important for servers that block some weapons in some rounds etc.

Plugin 1 using PTaH:
PHP Code:
public void OnPluginStart()

void GiveNamedItemPre(int clientchar classname[64], CEconItemView &itembool &ignoredCEconItemView)
//Do anything here to ak47 here or do nothing
return Plugin_Changed;

bool WeaponCanUse(int clientint entbool canuse)
//check if ent is the ak47 here etc
return true;

Other plugins
PHP Code:
public void OnClientPutInServer(int client)

//Block AK47
public Action Hook_BlockPickup(int clientint weapon)
char weaponClass[64];
  if (


In this case, the AK47 will always be equipped even if other plugins use SDKHooks with SDKHook_WeaponCanUse to block it. A lot of plugins use this so it would be good if there was a solution for this.

Why does returning Plugin_Changed in GiveNamedItemPre without changing anything cause the weapon to not be able to be picked up? I'm sure this can be fixed so the weapon can still be picked up by default without needing to use the PTaH weaponcanuse. That way you can just use SDKHooks only for WeaponCanUse.

What does removeIfNotCarried do?

Maybe using MRES_OVERRIDE here:

I did some testing, will try some more stuff later.
Let me know if you have any ideas.
STEAM: /id/invexbyte | Github: Mo Beigi | Discord: Byte#0017
Community: Invex Gaming | My Plugins: Click Me!

Last edited by Byte; 12-21-2017 at 13:36.
Byte is offline