Raised This Month: $12 Target: $400
 3% 

[CS:GO] Create glow around player.


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
eyal282
Veteran Member
Join Date: Aug 2011
Old 09-12-2018 , 16:55   [CS:GO] Create glow around player.
Reply With Quote #1

I'm trying a stock to create glow around player, but it creates another player which glows. If it was somehow possible to like make the glow's model invisible but the glow remain, it would probably work.

Code:
CreateGlow(client)
{
	new String:Model[PLATFORM_MAX_PATH];
	new Float:Origin[3], Float:Angles[3];

	// Get the original model path
	GetEntPropString(client, Prop_Data, "m_ModelName", Model, sizeof(Model));
	
	// Find the location of the player
	GetClientEyePosition(client, Origin);
	Origin[2] -= 75.0;
	GetClientEyeAngles(client, Angles);
	new GlowEnt = CreateEntityByName("prop_dynamic_glow");
	
	DispatchKeyValue(GlowEnt, "model", Model);
	DispatchKeyValue(GlowEnt, "disablereceiveshadows", "1");
	DispatchKeyValue(GlowEnt, "disableshadows", "1");
	DispatchKeyValue(GlowEnt, "solid", "0");
	DispatchKeyValue(GlowEnt, "spawnflags", "256");
	DispatchKeyValue(GlowEnt, "renderamt", "0");
	SetEntProp(GlowEnt, Prop_Send, "m_CollisionGroup", 11);
		
	// Spawn and teleport the entity
	DispatchSpawn(GlowEnt);
	TeleportEntity(GlowEnt, Origin, Angles, NULL_VECTOR);

	// Give glowing effect to the entity
	SetEntProp(GlowEnt, Prop_Send, "m_bShouldGlow", true, true);
	SetEntPropFloat(GlowEnt, Prop_Send, "m_flGlowMaxDist", 69420.0);

	// Set glowing color
	SetVariantColor({255, 255, 255, 255});
	AcceptEntityInput(GlowEnt, "SetGlowColor");

	// Set the activator and group the entity
	SetVariantString("!activator");
	AcceptEntityInput(GlowEnt, "SetParent", client);
	
	AcceptEntityInput(GlowEnt, "TurnOn");

}
__________________
I am available to make plugins for pay.

Discord: Eyal282#1334
eyal282 is offline
 


Thread Tools
Display Modes

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 06:26.


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