Thread: [Solved] Zeus with clip size 10, how?
View Single Post
bklol
Member
Join Date: May 2019
Location: on my chair
Old 06-10-2023 , 19:53   Re: Zeus with clip size 10, how?
Reply With Quote #5

need PTaH Extension
choose your os sig and complie
PHP Code:
#pragma semicolon 1 
#include <PTaH> 
#include <sdktools> 

#define addr_range                            268
#define addr_primary_clip_size                20
#define addr_primary_default_clip_size        28
#define addr_secondary_default_clip_size    32


Handle hGetCCSWeaponData;
char sig[] = "\x85\xC9\x75\x2A\x33\xC0\xC3\x8B\x01"//win
//char sig[] = "\x55\x89\xE5\x53\x83\xEC\x04\x8B\x45\x08\x85\xC0\x74\x4A\x8B\x15"; //linux

public void OnPluginStart()  
{
    
StartPrepSDKCall(SDKCall_Raw);
    
PrepSDKCall_SetSignature(SDKLibrary_Serversigsizeof(sig) - 1);
    
PrepSDKCall_SetReturnInfo(SDKType_PlainOldDataSDKPass_Plain);
    
hGetCCSWeaponData EndPrepSDKCall();
    if(!
hGetCCSWeaponDataSetFailState("Could not initialize call to GetCCSWeaponDataFromDef");
}

public 
void OnMapStart()  
{
    
CEconItemDefinition ItemDef;
    
Address CCSWeaponData;
    
ItemDef PTaH_GetItemDefinitionByName("weapon_taser");
    if(
ItemDef && (CCSWeaponData SDKCall(hGetCCSWeaponDataItemDef)))
    {
        
StoreToAddress(CCSWeaponData view_as<Address>(addr_range), 50NumberType_Int32);
        
StoreToAddress(CCSWeaponData view_as<Address>(addr_primary_clip_size), 10NumberType_Int32);
        
StoreToAddress(CCSWeaponData view_as<Address>(addr_primary_default_clip_size), 10NumberType_Int32);
        
StoreToAddress(CCSWeaponData view_as<Address>(addr_secondary_default_clip_size), 10NumberType_Int32);
    }

bklol is offline