AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How will I catch if someone is flashed? (https://forums.alliedmods.net/showthread.php?t=185099)

Bilal Pro 05-12-2012 16:47

How will I catch if someone is flashed?
 
Hello there,

Title says all :)

Exolent[jNr] 05-12-2012 17:01

Re: How will I catch if someone is flashed?
 
I've told you before in another thread. Hook ScreenFade message.

Bilal Pro 05-12-2012 17:11

Re: How will I catch if someone is flashed?
 
Yeah, but what to do when i hooked it how to catch the flash.

Exolent[jNr] 05-12-2012 17:27

Re: How will I catch if someone is flashed?
 
Run this:
Code:
#include <amxmodx> public plugin_init() {     register_plugin("ScreenFade Info", "0.0.1", "Exolent");         register_event("ScreenFade", "EventScreenFade", "b"); } public EventScreenFade(id) {     log_amx("ScreenFade for %d | Duration: %d | HoldTime: %d | Flags: %d | RGB: %d,%d,%d | Alpha: %d",         id, read_data(1), read_data(2), read_data(3), read_data(4), read_data(5), read_data(6), read_data(7)); }

Test different types of flashes and see how all of the values are.
You will know that the color will be white, so RGB will be 255,255,255.
Also, the alpha is always only 2 values: 255 (full flash) and like 200 (partial flash, value may be different).

Once you know those values, you hook ScreenFade message and check if those values are set.
If the values match, then the player got flashed.

yokomo 05-12-2012 22:35

Re: How will I catch if someone is flashed?
 
You can use hamsandwich updated module for it and it efficient.
PHP Code:

    /**
     * Description:        Whether or not the player is being flashing. (flashbang grenade explosion)
     *                    blindTime is the time you are considered as being blind. (holdTime * 0.33).
     * Forward params:    function(this, Float:blindTime, Float:duration, Float:holdTime, alpha);
     * Return type:        None.
     * Execute params:    ExecuteHam(Ham_CS_Player_Blind, this, Float:blindTime, Float:duration, Float:holdTime, alpha);
     */
    
Ham_CS_Player_Blind 


Santaaa 05-28-2012 14:38

Re: How will I catch if someone is flashed?
 
Can someone explain this to me more proplely?

Liverwiz 05-28-2012 15:03

Re: How will I catch if someone is flashed?
 
*facepalm* all of this was discussed in another thread. BY THE SAME GUY.

a thread discussing this.
http://forums.alliedmods.net/showthr...flashed+player

a plugin that properly utilizes flash functions
http://forums.alliedmods.net/showthr...ighlight=flash

more helpful information
http://forums.alliedmods.net/showthr...flashed+player

YAY search tool!

Santaaa 05-28-2012 15:19

Re: How will I catch if someone is flashed?
 
I said EXPLAIN..


All times are GMT -4. The time now is 00:20.

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