Use a Radius, Use this function and modify, put in to the register touch public
PHP Code:
#define RADIUS 500.0 // a Radius of 500 Unitys Half life Medition
#define is_player(%0) (1 <= %0 <= g_iMaxplayers)
new g_iMaxplayers
new g_MsgScreenFade
public plugin_init()
{
register_plugin("Vomit", "1.0", "Autor");
g_iMaxplayers = get_maxplayers()
g_MsgScreenFade = get_user_msgid("ScreenFade")
}
public ShitThisVomit(Client)
{
if( is_user_alive(Client) )
{
new iEnt;
new Float:flOrigin[3];
pev(Client, pev_origin, flOrigin); // use the Entity origin, not the User change this lines
while( (iEnt = engfunc(EngFunc_FindEntityInSphere, iEnt, flOrigin, RADIUS)) )
{
if( is_player(iEnt) && iEnt != Client )
{
message_begin(MSG_ONE_UNRELIABLE, g_MsgScreenFade, _, iEnt)
write_short(40); // Modifique the Flash duration
write_short(60);
write_short(0x0000); //Type of ScreenFade Search the others
write_byte(255); //R
write_byte(255); //G
write_byte(255); //B
write_byte(255); //Brightness
message_end();
}
}
}
return PLUGIN_HANDLED
}