Raised This Month: $ Target: $400
 0% 

Show Images in HUD?


Post New Thread Reply   
 
Thread Tools Display Modes
berni
SourceMod Plugin Approver
Join Date: May 2007
Location: Austria
Old 02-12-2011 , 13:08   Re: Show Images in HUD?
Reply With Quote #11

That's weird, because r_screenoverlay is a client side command, and that strips the flags serverside.
__________________
Why reinvent the wheel ? Download smlib with over 350 useful functions.

When people ask me "Plz" just because it's shorter than "Please" I feel perfectly justified to answer "No" because it's shorter than "Yes"
powered by Core i7 3770k | 32GB DDR3 1886Mhz | 2x Vertex4 SSD Raid0
berni is offline
Black Haze
BANNED
Join Date: Sep 2008
Location: Hamsterdam
Old 02-12-2011 , 13:10   Re: Show Images in HUD?
Reply With Quote #12

Quote:
Originally Posted by berni View Post
That's weird, because r_screenoverlay is a client side command, and that strips the flags serverside.
Don't ask me how it works, I do not know enough of SourcePawn for that.

But I used it in my code, and it works like a charm, no sv_cheats on , and no cheats can be used.

Plugin with code is located here:
http://forums.alliedmods.net/showthread.php?t=149758

The code is used in the sm_killmessage_framework.sp file.
Black Haze is offline
Monkeys
Veteran Member
Join Date: Jan 2010
Old 02-12-2011 , 13:23   Re: Show Images in HUD?
Reply With Quote #13

Yeah, simply stripping the cheat flag works to execute it via ClientCommand.

Don't ask me why, though. I don't quite get how Valve divides up their commands.
__________________
Get a lid on that zombie,
he's never gonna be alri-i-ight.
Oooh get a lid on that zombie,
or he's gonna feed all night.
Monkeys is offline
Black Haze
BANNED
Join Date: Sep 2008
Location: Hamsterdam
Old 02-12-2011 , 13:25   Re: Show Images in HUD?
Reply With Quote #14

Quote:
Originally Posted by Monkeys View Post
You can't show several overlays at once.

PS: It's easier to type "r_screenoverlay 0" instead of the \"\" :p
Force of habit, used to C# :p
Black Haze is offline
Monkeys
Veteran Member
Join Date: Jan 2010
Old 02-12-2011 , 13:28   Re: Show Images in HUD?
Reply With Quote #15

About showing several overlays at once, I'll research some methods of trying this and tell you what I find.

Perhaps the env_screenoverlay entity can be of use... I'll go test some things.
__________________
Get a lid on that zombie,
he's never gonna be alri-i-ight.
Oooh get a lid on that zombie,
or he's gonna feed all night.
Monkeys is offline
Black Haze
BANNED
Join Date: Sep 2008
Location: Hamsterdam
Old 02-12-2011 , 13:32   Re: Show Images in HUD?
Reply With Quote #16

Quote:
Originally Posted by Monkeys View Post
About showing several overlays at once, I'll research some methods of trying this and tell you what I find.

Perhaps the env_screenoverlay entity can be of use... I'll go test some things.
Be sure to let us know if it works, it'd be brilliant! I actually started fixing the overlays plugin to replace HLStatsX (it really fucks over any form of chat in a DM server, since it keeps spamming kill point messages), but I still can only show static overlays created before. It looks nice and can be used, but multiple overlays would be better, so actual scores could be positioned anywhere on screen.
Black Haze is offline
Monkeys
Veteran Member
Join Date: Jan 2010
Old 02-12-2011 , 13:43   Re: Show Images in HUD?
Reply With Quote #17

Well, testing was rather short, sadly enough.

The env_screenoverlay is quite useless, since it shows for all online players, and anyone else as soon as they join. And anything it can do, can be simulated with SM and r_screenoverlay.

The closest to combined overlays you can get is rapidly switching between them, but even at the fastest possible rate it looks choppy.

So no luck. You'd have to make an overlay for every possible occasion if you really want to combine.


(I thought about looking into how overlays are animated, but it seems to be quite something else entirely. I'll eventually get to it, but it really doesn't seem to be going anywhere.)
__________________
Get a lid on that zombie,
he's never gonna be alri-i-ight.
Oooh get a lid on that zombie,
or he's gonna feed all night.
Monkeys is offline
berni
SourceMod Plugin Approver
Join Date: May 2007
Location: Austria
Old 02-12-2011 , 14:41   Re: Show Images in HUD?
Reply With Quote #18

Quote:
Originally Posted by Black Haze View Post
Don't ask me how it works, I do not know enough of SourcePawn for that.

But I used it in my code, and it works like a charm, no sv_cheats on , and no cheats can be used.

Plugin with code is located here:
http://forums.alliedmods.net/showthread.php?t=149758

The code is used in the sm_killmessage_framework.sp file.
This interested me, so I did some tests.

It's like I thought, AtomicStryker's code is just placebo, it also works without it. The reason why this command is works is because the server executes it, and the client seems to ignore if sv_cheats is on or off when it comes from the server. I didn't know this, and it's a very special case since the command r_screenoverlay is the only command with both, FCVAR_CHEAT and server_can_execute flags.

And the client only supports one screen overlay at a time.

Also: when creating VTF textures, the Shader "MonitorScreen" seems to worked the best for me when creating the .vmt file with VTFEdit.
__________________
Why reinvent the wheel ? Download smlib with over 350 useful functions.

When people ask me "Plz" just because it's shorter than "Please" I feel perfectly justified to answer "No" because it's shorter than "Yes"
powered by Core i7 3770k | 32GB DDR3 1886Mhz | 2x Vertex4 SSD Raid0

Last edited by berni; 02-13-2011 at 09:15.
berni is offline
Monkeys
Veteran Member
Join Date: Jan 2010
Old 02-12-2011 , 15:42   Re: Show Images in HUD?
Reply With Quote #19

Are you sure about not needing to strip the cheatflag?
I do recall having some issues when not doing it.
__________________
Get a lid on that zombie,
he's never gonna be alri-i-ight.
Oooh get a lid on that zombie,
or he's gonna feed all night.
Monkeys is offline
berni
SourceMod Plugin Approver
Join Date: May 2007
Location: Austria
Old 02-12-2011 , 16:24   Re: Show Images in HUD?
Reply With Quote #20

Just think logical, r_screenoverlay is a clientside command, why would you do anything serverside ?
__________________
Why reinvent the wheel ? Download smlib with over 350 useful functions.

When people ask me "Plz" just because it's shorter than "Please" I feel perfectly justified to answer "No" because it's shorter than "Yes"
powered by Core i7 3770k | 32GB DDR3 1886Mhz | 2x Vertex4 SSD Raid0
berni 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 01:28.


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