Mensajes: 385
Temas: 144
Registro en: Mar 2020
Reputación:
0
Buenas noches !
Estoy buscando algun plugin que no permita flash entre teams..
Actualmente tenia este pero de un dia para el otro empezo a fallar.. cada vez que un compañero flashea a otro lo laguea..
Cabe destacar que no se modificó para nada el plugin..
El server cuenta con Reunion y ReGame
Código PHP: #include <amxmodx> #include <amxmisc> #include <hamsandwich> #include <fakemeta> #include <engine> #include <cstrike>
new pCvar_flash_team, pCvar_flash_spec, pCvar_flash_random_colors;
new CsTeams:g_TeamFlash
new g_iOwner;
public plugin_init() { register_plugin("No Team Flash", "v1.0", "Gonza.-*"); register_cvar("HidenSeek", "1"); pCvar_flash_team = register_cvar("bg_flash_team", "0") pCvar_flash_spec = register_cvar("bg_flash_spec", "0") pCvar_flash_random_colors = register_cvar("bg_flash_random_colors", "0") RegisterHam(Ham_Think, "grenade", "Grenade_Think") register_message(get_user_msgid("ScreenFade"), "messageScreenFade") }
public messageScreenFade(msgid, dest, id) { if (get_msg_arg_int(4) == 255 && get_msg_arg_int(5) == 255 && get_msg_arg_int(6) == 255 && g_iOwner != id) { if (!get_pcvar_num(pCvar_flash_spec) && is_user_connected(id) && cs_get_user_team(id) == CS_TEAM_SPECTATOR) return PLUGIN_HANDLED if (get_pcvar_num(pCvar_flash_team)) { if (get_pcvar_num(pCvar_flash_random_colors)) { set_msg_arg_int(4, ARG_BYTE, random(255)) set_msg_arg_int(5, ARG_BYTE, random(255)) set_msg_arg_int(6, ARG_BYTE, random(255)) } return PLUGIN_CONTINUE } else if (!get_pcvar_num(pCvar_flash_team) && is_user_connected(id) && cs_get_user_team(id) == g_TeamFlash) return PLUGIN_HANDLED else if (get_pcvar_num(pCvar_flash_random_colors)) { set_msg_arg_int(4, ARG_BYTE, random(255)) set_msg_arg_int(5, ARG_BYTE, random(255)) set_msg_arg_int(6, ARG_BYTE, random(255)) } } return PLUGIN_CONTINUE }
public Grenade_Think(ent) { if (get_pcvar_num(pCvar_flash_team)) return HAM_IGNORED static Float:flGameTime flGameTime = get_gametime() if (entity_get_float(ent, EV_FL_dmgtime) <= flGameTime && get_pdata_int(ent, 114) == 0 && !(get_pdata_int(ent, 96) & (1<<8))) { static iCount if (++iCount == 2) { static iOwner ; iOwner = entity_get_edict(ent, EV_ENT_owner) g_iOwner = iOwner; if (is_user_connected(iOwner)) g_TeamFlash = cs_get_user_team(iOwner) else g_TeamFlash = CS_TEAM_UNASSIGNED } else { g_TeamFlash = CS_TEAM_UNASSIGNED if (iCount == 3) iCount = 0 } } return HAM_IGNORED }
Mensajes: 138
Temas: 39
Registro en: Jul 2020
Reputación:
1
Código PHP: /* AMX Mod X Plugin * * (c) Copyright 2008, ConnorMcLeod * This file is provided as is (no warranties). * */
#include <amxmodx> #include <fakemeta>
#define PEV_PDATA_SAFE 2
#define MAX_PLAYERS 32 #define OFFSET_TEAM 114
#define W_FLASH_MODEL_STRLEN 22 #define FLASH_XPLODE_SOUND_STRLEN 23
new g_iMaxClients new bool:g_bHasJustBeenFlashed[MAX_PLAYERS+1] new g_msgidScreenFade
public plugin_init() { register_plugin("No Team Flash", "1.0.0", "ConnorMcLeod")
register_event("ScreenFade", "Event_ScreenFade", "be", "1>0", "2>0", "3=0","4=255", "5=255", "6=255", "7=200", "7=255") register_forward(FM_SetModel, "Forward_SetModel") register_forward(FM_EmitSound, "Forward_EmitSound") }
public plugin_cfg() { g_iMaxClients = global_get(glb_maxClients) g_msgidScreenFade = get_user_msgid("ScreenFade") } public Forward_SetModel(iEntity, const szModel[]) { if(strlen(szModel) != W_FLASH_MODEL_STRLEN) { return FMRES_IGNORED }
if(szModel[7] != 'w' || szModel[9] != 'f' || szModel[14] != 'b') { return FMRES_IGNORED }
if(!pev_valid(iEntity)) { return FMRES_IGNORED }
static Float:fVelocity[3] pev(iEntity, pev_velocity, fVelocity) if(!fVelocity[0] && !fVelocity[1] && !fVelocity[2]) { return FMRES_IGNORED }
set_pev(iEntity, pev_iuser4, pev(iEntity, pev_owner) ) return FMRES_HANDLED } public Forward_EmitSound(iEntity, iChannel, const szSample[]) { if(szSample[0] != 'w' || szSample[8] != 'f' || szSample[9] != 'l') { return FMRES_IGNORED }
if(!pev_valid(iEntity)) { return FMRES_IGNORED }
static iFlasher iFlasher = pev(iEntity, pev_iuser4) if( pev_valid(iFlasher) != PEV_PDATA_SAFE ) { return FMRES_IGNORED } static id, iTeam iTeam = get_pdata_int(iFlasher, OFFSET_TEAM)
for(id=1; id<=g_iMaxClients; id++) { if(!g_bHasJustBeenFlashed[id]) { continue }
g_bHasJustBeenFlashed[id] = false
if( pev_valid(id) != PEV_PDATA_SAFE ) { continue }
if(id != iFlasher && get_pdata_int(id, OFFSET_TEAM) == iTeam) { reset_screen(id) } }
return FMRES_HANDLED }
public Event_ScreenFade(id) { g_bHasJustBeenFlashed[id] = true }
public client_putinserver(id) { g_bHasJustBeenFlashed[id] = false }
reset_screen(id) { emessage_begin(MSG_ONE, g_msgidScreenFade, _, id) ewrite_short(4) ewrite_short(0) ewrite_short(0) ewrite_byte(0) ewrite_byte(0) ewrite_byte(0) ewrite_byte(0) emessage_end() }
(13/05/2017, 02:11 PM)DiCHANHO escribió: off: pobre este ya quedo traumado con lo del autor y robo de plugins (26/07/2020, 08:32 PM)Hinami escribió: & si soy un gordo cagon, virgen, con posters de anime en todas partes ✅✅Aportes✅✅
✅ Datear Automáticamente CincoYA
✅ Efecto Trueno y Rayo
Mensajes: 385
Temas: 144
Registro en: Mar 2020
Reputación:
0
(28/06/2022, 04:38 PM)Nacalau escribió: Código PHP: /* AMX Mod X Plugin * * (c) Copyright 2008, ConnorMcLeod * This file is provided as is (no warranties). * */
#include <amxmodx> #include <fakemeta>
#define PEV_PDATA_SAFE 2
#define MAX_PLAYERS 32 #define OFFSET_TEAM 114
#define W_FLASH_MODEL_STRLEN 22 #define FLASH_XPLODE_SOUND_STRLEN 23
new g_iMaxClients new bool:g_bHasJustBeenFlashed[MAX_PLAYERS+1] new g_msgidScreenFade
public plugin_init() { register_plugin("No Team Flash", "1.0.0", "ConnorMcLeod")
register_event("ScreenFade", "Event_ScreenFade", "be", "1>0", "2>0", "3=0","4=255", "5=255", "6=255", "7=200", "7=255") register_forward(FM_SetModel, "Forward_SetModel") register_forward(FM_EmitSound, "Forward_EmitSound") }
public plugin_cfg() { g_iMaxClients = global_get(glb_maxClients) g_msgidScreenFade = get_user_msgid("ScreenFade") } public Forward_SetModel(iEntity, const szModel[]) { if(strlen(szModel) != W_FLASH_MODEL_STRLEN) { return FMRES_IGNORED }
if(szModel[7] != 'w' || szModel[9] != 'f' || szModel[14] != 'b') { return FMRES_IGNORED }
if(!pev_valid(iEntity)) { return FMRES_IGNORED }
static Float:fVelocity[3] pev(iEntity, pev_velocity, fVelocity) if(!fVelocity[0] && !fVelocity[1] && !fVelocity[2]) { return FMRES_IGNORED }
set_pev(iEntity, pev_iuser4, pev(iEntity, pev_owner) ) return FMRES_HANDLED } public Forward_EmitSound(iEntity, iChannel, const szSample[]) { if(szSample[0] != 'w' || szSample[8] != 'f' || szSample[9] != 'l') { return FMRES_IGNORED }
if(!pev_valid(iEntity)) { return FMRES_IGNORED }
static iFlasher iFlasher = pev(iEntity, pev_iuser4) if( pev_valid(iFlasher) != PEV_PDATA_SAFE ) { return FMRES_IGNORED } static id, iTeam iTeam = get_pdata_int(iFlasher, OFFSET_TEAM)
for(id=1; id<=g_iMaxClients; id++) { if(!g_bHasJustBeenFlashed[id]) { continue }
g_bHasJustBeenFlashed[id] = false
if( pev_valid(id) != PEV_PDATA_SAFE ) { continue }
if(id != iFlasher && get_pdata_int(id, OFFSET_TEAM) == iTeam) { reset_screen(id) } }
return FMRES_HANDLED }
public Event_ScreenFade(id) { g_bHasJustBeenFlashed[id] = true }
public client_putinserver(id) { g_bHasJustBeenFlashed[id] = false }
reset_screen(id) { emessage_begin(MSG_ONE, g_msgidScreenFade, _, id) ewrite_short(4) ewrite_short(0) ewrite_short(0) ewrite_byte(0) ewrite_byte(0) ewrite_byte(0) ewrite_byte(0) emessage_end() }
Me presenta el mismo problema.. le tiro una fb a un compañero y lo lagueo
Mensajes: 1,072
Temas: 57
Registro en: Feb 2016
Reputación:
8
Código PHP: #include <amxmodx> #include <reapi>
#pragma semicolon 1
public plugin_init() { register_plugin( "No Team Flash", "1.0.0", "zekro" );
RegisterHookChain(RG_PlayerBlind, "@func_PlayerBlind", .post = false); }
@func_PlayerBlind(const iVictim, const iInflictor, const iAttacker, const Float:flFadeTime, const Float:flFadeHold, const iAlpha, Float:flColor[3]) { if (iVictim != iAttacker && get_member(iVictim, m_iTeam) == get_member(iAttacker, m_iTeam)) return HC_SUPERCEDE;
return HC_CONTINUE; }
Mensajes: 385
Temas: 144
Registro en: Mar 2020
Reputación:
0
(02/07/2022, 12:07 PM)Niper.-. escribió: Código PHP: #include <amxmodx> #include <reapi>
#pragma semicolon 1
public plugin_init() { register_plugin( "No Team Flash", "1.0.0", "zekro" );
RegisterHookChain(RG_PlayerBlind, "@func_PlayerBlind", .post = false); }
@func_PlayerBlind(const iVictim, const iInflictor, const iAttacker, const Float:flFadeTime, const Float:flFadeHold, const iAlpha, Float:flColor[3]) { if (iVictim != iAttacker && get_member(iVictim, m_iTeam) == get_member(iAttacker, m_iTeam)) return HC_SUPERCEDE;
return HC_CONTINUE; }
Esta testeado ?
Lo puse en mi server y los jugadores de un mismo equipo de flashean entre ellos
Mensajes: 106
Temas: 41
Registro en: May 2020
Reputación:
0
(04/07/2022, 10:00 PM)Gstrigl escribió: Esta testeado ?
Lo puse en mi server y los jugadores de un mismo equipo de flashean entre ellos
Código PHP: #include <amxmodx> #include <reapi>
#pragma semicolon 1
public stock const PluginName[] = "No Team Flash"; public stock const PluginVersion[] = "1.0.0"; public stock const PluginAuthor[] = "Chema"; public stock const PluginDescription[] = "You will not be blinded by the flashbangs of your teammates";
public plugin_init() { register_plugin( .plugin_name = PluginName, .version = PluginVersion, .author = PluginAuthor ); RegisterHookChain(RG_PlayerBlind, "@func_PlayerBlind", .post = false); }
@func_PlayerBlind(const iVictim, const iInflictor, const iAttacker, const Float:flFadeTime, const Float:flFadeHold, const iAlpha, Float:flColor[3]) { if (iVictim != iAttacker && get_member(iVictim, m_iTeam) == get_member(iAttacker, m_iTeam)) return HC_SUPERCEDE;
return HC_CONTINUE; }
Testeado, trabajando a la perfecion.
Mensajes: 659
Temas: 97
Registro en: Feb 2016
Reputación:
12
06/07/2022, 01:28 AM
(Última modificación: 06/07/2022, 01:30 AM por Alejandro. Edited 2 times in total.)
(04/07/2022, 10:36 PM)Null2020 escribió: Código PHP: #include <amxmodx> #include <reapi>
#pragma semicolon 1
public stock const PluginName[] = "No Team Flash"; public stock const PluginVersion[] = "1.0.0"; public stock const PluginAuthor[] = "Chema"; public stock const PluginDescription[] = "You will not be blinded by the flashbangs of your teammates";
public plugin_init() { register_plugin( .plugin_name = PluginName, .version = PluginVersion, .author = PluginAuthor ); RegisterHookChain(RG_PlayerBlind, "@func_PlayerBlind", .post = false); }
@func_PlayerBlind(const iVictim, const iInflictor, const iAttacker, const Float:flFadeTime, const Float:flFadeHold, const iAlpha, Float:flColor[3]) { if (iVictim != iAttacker && get_member(iVictim, m_iTeam) == get_member(iAttacker, m_iTeam)) return HC_SUPERCEDE;
return HC_CONTINUE; }
Testeado, trabajando a la perfecion.
Alv en años que tengo codeando por primera vez en mi vida veo esto xD
Código PHP: public stock const PluginName[] = "No Team Flash"; public stock const PluginVersion[] = "1.0.0"; public stock const PluginAuthor[] = "Chema"; public stock const PluginDescription[] = "You will not be blinded by the flashbangs of your teammates";
Aparte es lo mismo que el de arriba con diferente autor xd
Mensajes: 7,178
Temas: 93
Registro en: Aug 2014
Reputación:
63
06/07/2022, 11:20 AM
(Última modificación: 06/07/2022, 11:20 AM por Hinami.)
(06/07/2022, 01:28 AM)Alejandro escribió: Código PHP: public stock const PluginName[] = "No Team Flash"; public stock const PluginVersion[] = "1.0.0"; public stock const PluginAuthor[] = "Chema"; public stock const PluginDescription[] = "You will not be blinded by the flashbangs of your teammates";
Aparte es lo mismo que el de arriba con diferente autor xd
nadie
absolutamente nadie
niper: * le voy a borrar los static al autor porque se ve feo, ahh que autor decia? bueno me pongo yo *
Mensajes: 1,072
Temas: 57
Registro en: Feb 2016
Reputación:
8
(06/07/2022, 11:20 AM)Hinami escribió: nadie
absolutamente nadie
niper: * le voy a borrar los static al autor porque se ve feo, ahh que autor decia? bueno me pongo yo *
Solo te dejo esto... https://amxmodx-es.com/Thread-Plugin-TEA...#pid216316
Salu2
Mensajes: 385
Temas: 144
Registro en: Mar 2020
Reputación:
0
Gente.. probe varios sma que me dejaron y no logro que alguno funcione..
A que se puede deber el problema que se generó con respecto al plugin que venia utilizando sin problemas, sin hacerle cambio al mismo o al server en general empezo con estos temas...
|