Team No Flash
#1
Probe este plugin,pero flashean igual al equipo
Código PHP:
/*************************************************************************************************************
                                       AMX No Team Flash

  Version: 0.2
  Author: KRoT@L

  0.1    Release
  0.2    Bug fix


  You won't be flashed by your teammates.


  Cvar:

    no_team_flash "1"        -    0: Disables the plugin
                        1: Enables the plugin
                        

  Setup (AMX 0.9.9):

    Install the amx file.
  Enabled VexdUM (both in metamod/plugins.ini and amx/config/modules.ini)
  
  
  Credits:
  
  Requested by baldbobby
  Cluster Grenade by doomy

*************************************************************************************************************/

#include <amxmodx>

new g_msgScreenFadegrenade[32], last
new Float:g_gametimeg_owner

public plugin_init()
{
    
register_plugin("No Team Flash""0.2""KRoTaL")
    
register_cvar("no_team_flash""1")
    
register_event("ScreenFade""eventFlash""be""4=255""5=255""6=255""7>199")
    
register_event("TextMsg""fire_in_the_hole""b""2&#Game_radio""4&#Fire_in_the_hole")
    
register_event("TextMsg""fire_in_the_hole2""b""3&#Game_radio""5&#Fire_in_the_hole")
    
register_event("99""grenade_throw""b")
    
g_msgScreenFade get_user_msgid("ScreenFade")
}

public 
eventFlash(id)
{
  new 
Float:gametime get_gametime()
  if(
gametime != g_gametime)
  {
    
g_owner get_grenade_owner()
    
g_gametime gametime
  
}
  if(
is_user_connected(g_owner) && g_owner != id && get_user_team(id) == get_user_team(g_owner))
  {
      
message_begin(MSG_ONEg_msgScreenFade, {0,0,0}, id)
      
write_short(1)
      
write_short(1)
      
write_short(1)
      
write_byte(0)
      
write_byte(0)
      
write_byte(0)
      
write_byte(255)
      
message_end()
    }
}

public 
grenade_throw()
{
    if(
read_datanum() < 2)
    return 
PLUGIN_HANDLED_MAIN

    
if(read_data(1) == 11 && (read_data(2) == || read_data(2) == 1))
    {
        
add_grenade_owner(last)
    }

    return 
PLUGIN_CONTINUE
}

public 
fire_in_the_hole()
{
    new 
name[32]
    
read_data(3name31)
    
last get_user_index(name)

    return 
PLUGIN_CONTINUE
}

public 
fire_in_the_hole2()
{
    new 
name[32]
    
read_data(4name31)
    
last get_user_index(name)

    return 
PLUGIN_CONTINUE
}

add_grenade_owner(owner)
{
    for(new 
032i++)
  {
        if(
grenade[i] == 0)
    {
            
grenade[i] = owner
            
return
        }
    }
}

get_grenade_owner()
{
    new 
which grenade[0]
    for(new 
132i++)
  {
        
grenade[i-1] = grenade[i]
    }
    
grenade[31] = 0
    
return which

alguna solucion ?
Responder
#2
Asi lo tengo yo en mi hns....

Plugin_ini:
Código PHP:
register_message(get_user_msgid("ScreenFade"), "Message_ScreenFade"

Funcion:
Código PHP:
public Message_ScreenFade(MsgIdMsgDestMsgEntity) {
    if(
get_msg_arg_int(4) == 255 && get_msg_arg_int(5) == 255 && get_msg_arg_int(6) == 255) {
        if(!
is_user_connected(MsgEntity) || cs_get_user_team(MsgEntity) == CS_TEAM_T]) return PLUGIN_HANDLED;
        
set_msg_arg_int(4ARG_BYTErandom(255))
        
set_msg_arg_int(5ARG_BYTErandom(255))
        
set_msg_arg_int(6ARG_BYTErandom(255))
    }
    return 
PLUGIN_CONTINUE;

Responder
#3
(13/06/2016, 07:02 PM)Asd123Asd escribió: Asi lo tengo yo en mi hns....

Plugin_ini:
Código PHP:
register_message(get_user_msgid("ScreenFade"), "Message_ScreenFade"

Funcion:
Código PHP:
public Message_ScreenFade(MsgIdMsgDestMsgEntity) {
    if(
get_msg_arg_int(4) == 255 && get_msg_arg_int(5) == 255 && get_msg_arg_int(6) == 255) {
        if(!
is_user_connected(MsgEntity) || cs_get_user_team(MsgEntity) == CS_TEAM_T]) return PLUGIN_HANDLED;
        
set_msg_arg_int(4ARG_BYTErandom(255))
        
set_msg_arg_int(5ARG_BYTErandom(255))
        
set_msg_arg_int(6ARG_BYTErandom(255))
    }
    return 
PLUGIN_CONTINUE;


a ver pruebo
Responder
#4
Código PHP:
register_event("ScreenFade""eventFlash""be""4=255""5=255""6=255""7>199"

-->

Código PHP:
register_event("ScreenFade""eventFlash""be""4=255""5=255""6=255"
Responder
#5
Esto sirve para cualquier sv? necesito evitar que se flashen entre compañeros..
Responder
#6
Si, para cualquier servidor y modo...

Solo Adaptalo.
Responder
#7
Yo lo necesito para un publico y no tengo la menor idea de adaptarlo pacman jaja
Responder
#8
No tienes que adaptar practicamente nada toma
Código PHP:
/********************************************************************************​*****************************
                                       AMX No Team Flash

  Version: 0.2
  Author: KRoT@L

  0.1    Release
  0.2    Bug fix


  You won't be flashed by your teammates.


  Cvar:

    no_team_flash "1"        -    0: Disables the plugin
                        1: Enables the plugin
                        

  Setup (AMX 0.9.9):

    Install the amx file.
  Enabled VexdUM (both in metamod/plugins.ini and amx/config/modules.ini)
  
  
  Credits:
  
  Requested by baldbobby
  Cluster Grenade by doomy

********************************************************************************​*****************************/

#include <amxmodx>

new g_msgScreenFadegrenade[32], last
new Float:g_gametimeg_owner

public plugin_init()
{
    
register_plugin("No Team Flash""0.2""KRoTaL")
    
register_cvar("no_team_flash""1")
    
register_event("ScreenFade""eventFlash""be""4=255""5=255""6=255")
    
register_event("TextMsg""fire_in_the_hole""b""2&#Game_radio""4&#Fire_in_the_hole")
    
register_event("TextMsg""fire_in_the_hole2""b""3&#Game_radio""5&#Fire_in_the_hole")
    
register_event("99""grenade_throw""b")
    
g_msgScreenFade get_user_msgid("ScreenFade")
}

public 
eventFlash(id)
{
  new 
Float:gametime get_gametime()
  if(
gametime != g_gametime)
  {
    
g_owner get_grenade_owner()
    
g_gametime gametime
  
}
  if(
is_user_connected(g_owner) && g_owner != id && get_user_team(id) == get_user_team(g_owner))
  {
      
message_begin(MSG_ONEg_msgScreenFade, {0,0,0}, id)
      
write_short(1)
      
write_short(1)
      
write_short(1)
      
write_byte(0)
      
write_byte(0)
      
write_byte(0)
      
write_byte(255)
      
message_end()
    }
}

public 
grenade_throw()
{
    if(
read_datanum() < 2)
    return 
PLUGIN_HANDLED_MAIN

    
if(read_data(1) == 11 && (read_data(2) == || read_data(2) == 1))
    {
        
add_grenade_owner(last)
    }

    return 
PLUGIN_CONTINUE
}

public 
fire_in_the_hole()
{
    new 
name[32]
    
read_data(3name31)
    
last get_user_index(name)

    return 
PLUGIN_CONTINUE
}

public 
fire_in_the_hole2()
{
    new 
name[32]
    
read_data(4name31)
    
last get_user_index(name)

    return 
PLUGIN_CONTINUE
}

add_grenade_owner(owner)
{
    for(new 
032i++)
  {
        if(
grenade[i] == 0)
    {
            
grenade[i] = owner
            
return
        }
    }
}

get_grenade_owner()
{
    new 
which grenade[0]
    for(new 
132i++)
  {
        
grenade[i-1] = grenade[i]
    }
    
grenade[31] = 0
    
return which

Mis Aportes:

[ TTT ] Item: Target Gun

[ TTT ] Item: Skeleton Gun (New)
[ TTT ] Item: Pipe Bomb
[ TTT ] Item: Inverse Golden
[Imagen: 76561198074954930.png] [Imagen: venezuela.gif]
Pregúntate si lo que estás haciendo hoy te acerca a el lugar en el que quieres estar mañana. Corazón
Responder
#9
Usa este > https://forums.alliedmods.net/showthread.php?t=74091
Configuralo para que no flashee a los del propio equipo.
Responder
#10
Con este ultimo como deberia estar configurado para que sancione al que tire 3 latas en una ronda? y que despues de que cambie de mapa esa sancion se vaya? porque sigue sancionado el jugador o tiras mas de 3 latas y no lo sanciona e.e
Responder
#11
(15/06/2016, 02:21 PM)emah094 escribió: Con este ultimo como deberia estar configurado para que sancione al que tire 3 latas en una ronda? y que despues de que cambie de mapa esa sancion se vaya? porque sigue sancionado el jugador o tiras mas de 3 latas y no lo sanciona e.e

Te conviene configurarlo como te dije, para que no flashee a los del propio equipo.
Responder
#12
(14/06/2016, 10:42 PM)SthoNy escribió: No tienes que adaptar practicamente nada toma
Código PHP:
/********************************************************************************​*****************************
                                       AMX No Team Flash

  Version: 0.2
  Author: KRoT@L

  0.1    Release
  0.2    Bug fix


  You won't be flashed by your teammates.


  Cvar:

    no_team_flash "1"        -    0: Disables the plugin
                        1: Enables the plugin
                        

  Setup (AMX 0.9.9):

    Install the amx file.
  Enabled VexdUM (both in metamod/plugins.ini and amx/config/modules.ini)
  
  
  Credits:
  
  Requested by baldbobby
  Cluster Grenade by doomy

********************************************************************************​*****************************/

#include <amxmodx>

new g_msgScreenFadegrenade[32], last
new Float:g_gametimeg_owner

public plugin_init()
{
    
register_plugin("No Team Flash""0.2""KRoTaL")
    
register_cvar("no_team_flash""1")
    
register_event("ScreenFade""eventFlash""be""4=255""5=255""6=255")
    
register_event("TextMsg""fire_in_the_hole""b""2&#Game_radio""4&#Fire_in_the_hole")
    
register_event("TextMsg""fire_in_the_hole2""b""3&#Game_radio""5&#Fire_in_the_hole")
    
register_event("99""grenade_throw""b")
    
g_msgScreenFade get_user_msgid("ScreenFade")
}

public 
eventFlash(id)
{
  new 
Float:gametime get_gametime()
  if(
gametime != g_gametime)
  {
    
g_owner get_grenade_owner()
    
g_gametime gametime
  
}
  if(
is_user_connected(g_owner) && g_owner != id && get_user_team(id) == get_user_team(g_owner))
  {
      
message_begin(MSG_ONEg_msgScreenFade, {0,0,0}, id)
      
write_short(1)
      
write_short(1)
      
write_short(1)
      
write_byte(0)
      
write_byte(0)
      
write_byte(0)
      
write_byte(255)
      
message_end()
    }
}

public 
grenade_throw()
{
    if(
read_datanum() < 2)
    return 
PLUGIN_HANDLED_MAIN

    
if(read_data(1) == 11 && (read_data(2) == || read_data(2) == 1))
    {
        
add_grenade_owner(last)
    }

    return 
PLUGIN_CONTINUE
}

public 
fire_in_the_hole()
{
    new 
name[32]
    
read_data(3name31)
    
last get_user_index(name)

    return 
PLUGIN_CONTINUE
}

public 
fire_in_the_hole2()
{
    new 
name[32]
    
read_data(4name31)
    
last get_user_index(name)

    return 
PLUGIN_CONTINUE
}

add_grenade_owner(owner)
{
    for(new 
032i++)
  {
        if(
grenade[i] == 0)
    {
            
grenade[i] = owner
            
return
        }
    }
}

get_grenade_owner()
{
    new 
which grenade[0]
    for(new 
132i++)
  {
        
grenade[i-1] = grenade[i]
    }
    
grenade[31] = 0
    
return which


Ahora funciona joya gracias Mario
Responder


Salto de foro:


Usuarios navegando en este tema: 1 invitado(s)