Raised This Month: $ Target: $400
 0% 

Glow


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
gubka
Veteran Member
Join Date: Jan 2012
Location: Russia
Old 03-17-2016 , 12:41   Glow
Reply With Quote #1

Hi, i tried to do glow only for TE, and everything work fine, but if i respawn i see this



Who can help you solve this?

PHP Code:
#define EF_BONEMERGE                (1 << 0)
#define EF_NOSHADOW                 (1 << 4)
#define EF_NORECEIVESHADOW          (1 << 6)
#define EF_PARENT_ANIMATES          (1 << 9)

#define CPS_RENDER                  (1 << 0)
#define CPS_NOATTACHMENT            (1 << 1)
#define CPS_IGNOREDEATH             (1 << 2) 
 
void SetGlowing(int clientIndex)
{
    
char model[PLATFORM_MAX_PATH]; 
    
GetClientModel(clientIndexmodelsizeof(model)); 
    
int skin CreatePlayerModelProp(clientIndexmodel); 
    
SetEntProp(skinProp_Send"m_bShouldGlow"truetrue);
    
    
SetEntProp(skinProp_Send"m_nGlowStyle"0);
    
SetEntPropFloat(skinProp_Send"m_flGlowMaxDist"10000000.0);
    
    
// So now setup given glow colors for the skin
    
SetEntData(skinGetEntSendPropOffs(skin"m_clrGlow"), 192_true);    // Red
    
SetEntData(skinGetEntSendPropOffs(skin"m_clrGlow") + 1160_true); // Green
    
SetEntData(skinGetEntSendPropOffs(skin"m_clrGlow") + 296_true); // Blue
    
SetEntData(skinGetEntSendPropOffs(skin"m_clrGlow") + 364_true); // Alpha
}

 
int CreatePlayerModelProp(int clientchar[] sModel
{
    
RemoveSkin(client);
    
int Ent CreateEntityByName("prop_dynamic_override");
    
DispatchKeyValue(Ent"model"sModel);
    
DispatchKeyValue(Ent"disablereceiveshadows""1");
    
DispatchKeyValue(Ent"disableshadows""1");
    
DispatchKeyValue(Ent"solid""0");
    
DispatchKeyValue(Ent"spawnflags""256");
    
SetEntProp(EntProp_Send"m_CollisionGroup"11);
    
DispatchSpawn(Ent);
    
SetEntProp(EntProp_Send"m_fEffects"EF_BONEMERGE|EF_NOSHADOW|EF_NORECEIVESHADOW|EF_PARENT_ANIMATES);
    
SetVariantString("!activator");
    
AcceptEntityInput(Ent"SetParent"clientEnt0);
    
SetVariantString("primary");
    
AcceptEntityInput(Ent"SetParentAttachment"EntEnt0);
    
gPlayerModels[client] = EntIndexToEntRef(Ent);

    
SDKHook(EntSDKHook_SetTransmitOnShouldDisplay);
    return 
Ent;
}


void RemoveSkin(int client
{
    if(
IsValidEntity(gPlayerModels[client])) 
    {
        
AcceptEntityInput(gPlayerModels[client], "Kill");
    }
    
    
SetEntityRenderMode(clientRENDER_NORMAL);
    
gPlayerModels[client] = INVALID_ENT_REFERENCE;
}

public 
Action OnShouldDisplay(int Entint Client
{
    return (
GetClientTeam(Client) == CS_TEAM_CT)  ? Plugin_Handled Plugin_Continue;

__________________
gubka is offline
Send a message via ICQ to gubka
 



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 00:42.


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