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

[INC] ScreenFade Util [RAGE Supported]


Post New Thread Reply   
 
Thread Tools Display Modes
brian201049
Member
Join Date: Mar 2011
Location: Hong Kong
Old 02-08-2012 , 08:03   Re: [INC] ScreenFade Util
Reply With Quote #21

How about UTIL_ScreenShake
brian201049 is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 02-08-2012 , 10:50   Re: [INC] ScreenFade Util
Reply With Quote #22

Quote:
Originally Posted by brian201049 View Post
How about UTIL_ScreenShake
Spoiler
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 02-08-2012 , 10:55   Re: [INC] ScreenFade Util
Reply With Quote #23

Well, one thing 'UNDONE' fixed + moved message check out of loop.

Spoiler
__________________

Last edited by Arkshine; 02-08-2012 at 11:31.
Arkshine is offline
Old 02-08-2012, 11:53
doondook
This message has been deleted by doondook.
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 03-24-2012 , 08:00   Re: [INC] ScreenFade Util
Reply With Quote #24

Rage version :

Three stocks :

Code:
// Main util
UTIL_ScreenFade(id, Float:color[3]={0.0,0.0,0.0},Float:fadeTime=0.0,Float:fadeHold=0.0,alpha=0,flags=FFADE_IN)


// Utils from main util

UTIL_FadeToBlack(id,Float:fadeTime=3.0)


UTIL_Flash(id, Float:fadeTime, Float:holdTime, bool:bFullFlashed)
Details :
  • fadeTime and fadeHold in seconds.
  • color, type : { 0.0-255.0 , 0.0-255.0 , 0.0-255.0 }
  • alpha, type : 0-255
  • flags : see .inc
Attached Files
File Type: zip HANDLERS_screenfade_util_SRC.zip (117.8 KB, 329 views)
File Type: zip HANDLERS_screenfade_util_BIN.zip (87.8 KB, 327 views)
File Type: zip SIGS_screenfade_util.zip (1.8 KB, 323 views)
File Type: inc screenfade_util_rage.inc (1.5 KB, 294 views)
__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 02-01-2013 at 15:32.
ConnorMcLeod is offline
bogdyuttzu
Senior Member
Join Date: Dec 2009
Location: Romania
Old 03-24-2012 , 09:03   Re: [INC] ScreenFade Util [RAGE Supported]
Reply With Quote #25

What about ScreenShake with rage?
bogdyuttzu is offline
Send a message via Yahoo to bogdyuttzu
yokomo
Surprise Ascot!
Join Date: May 2010
Location: Malaysia
Old 03-24-2012 , 11:44   Re: [INC] ScreenFade Util [RAGE Supported]
Reply With Quote #26

Sorry, how can i set screen shake for 1 person only?
Code:
UTIL_ScreenShake( const Float:center[3], const Float:amplitude, const Float:frequency, const Float:duration, const Float:radius )
I don't see any param for player index.
__________________
Team-MMG CS1.6 Servers:
✅ MultiMod -- 103.179.44.152:27016
✅ Zombie Plague -- 103.179.44.152:27015
✅ Zombie Escape -- 103.179.44.152:27017
✅ Klassik Kombat -- 103.179.44.152:27018
✅ Boss-Battle -- 103.179.44.152:27019
yokomo is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 03-24-2012 , 11:49   Re: [INC] ScreenFade Util [RAGE Supported]
Reply With Quote #27

That's not mean to be used for one player. This function calculates the amplitude depending the radius and distance for each player. It doesn't really make sense to send the message only for one player. If you still want to do that, simply redo the function yourself, you have the code in HLSDK, and if I remember conversion to amxx somewhere on the forum.
__________________

Last edited by Arkshine; 03-24-2012 at 11:50.
Arkshine is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 03-24-2012 , 12:08   Re: [INC] ScreenFade Util [RAGE Supported]
Reply With Quote #28

Quote:
Originally Posted by bogdyuttzu View Post
What about ScreenShake with rage?
Waiting arkshine have time to compile handler for linux and will post it there.

Stocks for use with attachements if you want :
PHP Code:
stock UTIL_ScreenShakeFloat:center[3], Float:amplitudeFloat:frequencyFloat:durationFloat:radius )
{
    static 
RageFunc:__FuncUTIL_ScreenShake;
    if( !
__FuncUTIL_ScreenShake __FuncUTIL_ScreenShake RageGetFunction("UTIL_ScreenShake");
    
RageCall(__FuncUTIL_ScreenShakecenteramplitudefrequencydurationradius);
}

stock UTIL_ScreenShakeAllFloat:center[3], Float:amplitudeFloat:frequencyFloat:duration )
{
    
UTIL_ScreenShakecenteramplitudefrequencyduration0.0 );

Attached Files
File Type: zip HANDLER_Void__Vector-ref_Float_Float_Float_Float_SRC.zip (59.4 KB, 164 views)
File Type: zip screenshake_files.zip (44.9 KB, 158 views)
__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 03-24-2012 at 14:53.
ConnorMcLeod is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 03-24-2012 , 13:56   Re: [INC] ScreenFade Util [RAGE Supported]
Reply With Quote #29

Here.
Attached Files
File Type: so Void__Vector-ref_Float_Float_Float_Float.rh.so (13.6 KB, 212 views)
__________________
Arkshine is offline
bazhenov93
Veteran Member
Join Date: Oct 2010
Old 04-11-2012 , 20:45   Re: [INC] ScreenFade Util [RAGE Supported]
Reply With Quote #30

BUG?

PHP Code:
set_pev(idpev_originlj_position[lalin-220])
client_cmd (id"spk sound/goto_tp.mp3")
UTIL_ScreenFade(idget_cvar_color1(goto_Redgoto_Greengoto_Blue), 0.550.4560)
ColorChat(idRED"{^4Server Name^3} ^1Moved to LJ Block: ^4%i"lalin
te result;



without the screenfade_util.inc

{Server Name} Moved to CJ Block: ^4% ( has I need )
bazhenov93 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 10:36.


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