Raised This Month: $429 Target: $400
 107% 

HUD Overlays


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
OXYD
Junior Member
Join Date: Aug 2019
Location: pluto
Old 03-26-2020 , 14:44   HUD Overlays
Reply With Quote #1

Hello! Does anyone know how can i add an overlay?
I'd like to make a permanent overlay on the screen.

HTML Code:
if (IsClientInGame(i))  
        {  
            //overlay script 
        }  
__________________
ADD ME ON STEAM - https://steamcommunity.com/id/kenoxyd
89.40.104.227:27015 // COMPETITIVE SERVER
93.114.82.204:27015 // ARENA SERVER

DISCORD: KENOXYD#9098

Last edited by OXYD; 03-26-2020 at 14:44.
OXYD is offline
Had3s99
Member
Join Date: Sep 2015
Location: France
Old 03-26-2020 , 22:02   Re: HUD Overlays
Reply With Quote #2

Hellow,

Code:
// Show overlay to all clients with lifetime | 0.0 = no auto remove
stock void ShowOverlayAll(char[] path, float lifetime)
{
	for (int i = 1; i <= MaxClients; i++)
	{
		if (!IsClientInGame(i) || IsFakeClient(i) || IsClientSourceTV(i) || IsClientReplay(i))
			continue;

		int iFlag = GetCommandFlags("r_screenoverlay") & (~FCVAR_CHEAT);
		SetCommandFlags("r_screenoverlay", iFlag);
		ClientCommand(i, "r_screenoverlay \"%s.vtf\"", path);

		if (lifetime != 0.0)
			CreateTimer(lifetime, DeleteOverlay, GetClientUserId(i));
	}
}
Use this function
__________________
Had3s99 is offline
OXYD
Junior Member
Join Date: Aug 2019
Location: pluto
Old 03-27-2020 , 05:13   Re: HUD Overlays
Reply With Quote #3

Quote:
Originally Posted by Had3s99 View Post
Hellow,

Code:
// Show overlay to all clients with lifetime | 0.0 = no auto remove
stock void ShowOverlayAll(char[] path, float lifetime)
{
	for (int i = 1; i <= MaxClients; i++)
	{
		if (!IsClientInGame(i) || IsFakeClient(i) || IsClientSourceTV(i) || IsClientReplay(i))
			continue;

		int iFlag = GetCommandFlags("r_screenoverlay") & (~FCVAR_CHEAT);
		SetCommandFlags("r_screenoverlay", iFlag);
		ClientCommand(i, "r_screenoverlay \"%s.vtf\"", path);

		if (lifetime != 0.0)
			CreateTimer(lifetime, DeleteOverlay, GetClientUserId(i));
	}
}
Use this function
Ok, but where do i put the .vtf location?
EDIT: Nevermind, solved. Thanks
__________________
ADD ME ON STEAM - https://steamcommunity.com/id/kenoxyd
89.40.104.227:27015 // COMPETITIVE SERVER
93.114.82.204:27015 // ARENA SERVER

DISCORD: KENOXYD#9098

Last edited by OXYD; 03-27-2020 at 07:42.
OXYD is offline
Reply


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 11:39.


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