View Single Post
psychonic

BAFFLED
Join Date: May 2008
Old 01-30-2016 , 21:28   Re: The CS:GO "Is plugin allowed?" thread
Reply With Quote #5

Quote:
Originally Posted by micapat View Post
Can a modification of "m_nModelIndex" trigger the detection method in CS:GO ?

PHP Code:
#pragma semicolon 1

#include <sourcemod>
#include <sdktools>
#include <sdkhooks>

public void OnClientPutInServer(int iClient)
{
    
SDKHook(iClientSDKHook_WeaponSwitchPostCCSPlayer__WeaponSwitchPost);
}

public 
void CCSPlayer__WeaponSwitchPost(int iClientint iWeapon)
{
    
char szClassname[32];
    
GetEdictClassname(iWeaponszClassnamesizeof(szClassname));
    
    if (
StrEqual(szClassname"weapon_knife"))
    {
        
// Set the worldmodel of the knife invisible
        
SetEntProp(GetEntPropEnt(iWeaponProp_Send"m_hWeaponWorldModel"), Prop_Send"m_nModelIndex", -1);
        
        
PrintToChat(iClient"CCSPlayer__WeaponSwitchPost !");
    }

Hiding the world-view of the weapon using that method does not trigger a detection in the current CS:GO version.

Last edited by psychonic; 01-30-2016 at 21:29.
psychonic is offline