Raised This Month: $ Target: $400
 0% 

[CSS] Weapon sound


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
artimedas
Member
Join Date: Aug 2012
Location: Lithuania
Old 09-28-2013 , 09:39   Re: [CSS] Weapon sound
Reply With Quote #1

possible for other weapon , like deagle , AK47 ? block client side sounds

PHP Code:
// no client predict 

public OnClientPutInServer(id

    
SDKHook(idSDKHook_WeaponEquipWeaponEquip_CallBack); 


public 
WeaponEquip_CallBack(idweapons

    if(
IsValidEdict(weapons) && IsValidEntity(weapons)) 
    { 
        
decl String:classname[32]; 
        
GetEdictClassname(weaponsclassnamesizeof(classname)); 
        if(
StrEqual(classname"weapon_p90")) 
        { 
            
SDKHook(weaponsSDKHook_SetTransmitSetTransmit_CallBack); 
        } 
    } 


public 
Action:SetTransmit_CallBack(entityviewer

    new 
owner GetEntPropEnt(entityProp_Send"m_hOwnerEntity"); 
    if(
viewer && viewer <= MaxClients
    { 
        new 
weapons GetEntPropEnt(viewerProp_Send"m_hActiveWeapon"); 
        if(
owner == viewer && weapons == GetPlayerWeaponSlot(viewer0)) 
            return 
Plugin_Handled
    } 
    if(
owner && owner <= MaxClients && (!IsClientInGame(owner))) SDKUnhook(entitySDKHook_SetTransmitSetTransmit_CallBack); 
    return 
Plugin_Continue

So match bugs weapon on left hand, Weapon ammo hud bug

Last edited by artimedas; 09-28-2013 at 11:29.
artimedas 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 05:10.


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