Plugin de asistencias fix ?
#1
hola gente, espero que anden bien.
Queria saber si alguno cuenta con dicho plugins, los que estan en internet tienen un temita que desactivan admines o plugins.. deberan tener algo tipo backdoor
Responder
#2
Tengo este que usa reapi, lo tenia adaptado a un mod por eso no trae autor, pero creditos a quien corresponda

Código PHP:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <reapi>

new Float:g_playerDamage[MAX_PLAYERS 1][MAX_PLAYERS 1];
new 
HookChain:g_deathNoticePostHook;

public 
plugin_init()
{
    
RegisterHookChain(RG_CBasePlayer_Spawn"OnPlayerSpawn_Post"true);
    
RegisterHookChain(RG_CBasePlayer_TakeDamage"OnPlayerTakeDamage_Post"true);
    
RegisterHookChain(RG_CSGameRules_DeathNotice"OnDeathNotice"false);
    
DisableHookChain((g_deathNoticePostHook RegisterHookChain(RG_CSGameRules_DeathNotice"OnDeathNotice_Post"true)));
}

public 
client_connect(playerEntIndex)
{
    
arrayset(_:g_playerDamage[playerEntIndex], 0sizeof(g_playerDamage[]));
}

public 
OnPlayerSpawn_Post(playerEntIndex)
{
    for(new 
1<= MaxClientsi++)
    {
        
g_playerDamage[i][playerEntIndex] = 0.0;
    }
}

public 
OnPlayerTakeDamage_Post(playerEntIndexinflictorEntIndexattackerEntIndexFloat:damagedamageType)
{
    if(
attackerEntIndex != playerEntIndex && is_user_connected(attackerEntIndex) && rg_is_player_can_takedamage(attackerEntIndexplayerEntIndex))
    {
        
g_playerDamage[attackerEntIndex][playerEntIndex] += damage;
    }
}

public 
OnDeathNotice(victimEntIndexkillerEntIndexinflictorEntIndex)
{
    if(
killerEntIndex != victimEntIndex && is_user_connected(killerEntIndex) && rg_is_player_can_takedamage(killerEntIndexvictimEntIndex))
    {
        new 
bestAttackerEntIndex 0;
        for(new 
1Float:maxDamage<= MaxClientsi++)
        {
            if(
g_playerDamage[i][victimEntIndex] > maxDamage)
            {
                
maxDamage g_playerDamage[i][victimEntIndex];
                
bestAttackerEntIndex i;
            }
        }
        
        if(
bestAttackerEntIndex != killerEntIndex && is_user_connected(bestAttackerEntIndex) && rg_is_player_can_takedamage(bestAttackerEntIndexvictimEntIndex) && get_member(bestAttackerEntIndexm_iTeam) != TEAM_SPECTATOR)
        {
            new 
name1[MAX_NAME_LENGTH], name2[MAX_NAME_LENGTH], name[MAX_NAME_LENGTH];
            
            
get_entvar(killerEntIndexvar_netnamename1charsmax(name1));
            
get_entvar(bestAttackerEntIndexvar_netnamename2charsmax(name2));
            
            
rg_add_account(bestAttackerEntIndex300);
            
            
set_entvar(bestAttackerEntIndexvar_fragsFloat:get_entvar(bestAttackerEntIndexvar_frags) + 1.0);
            
            if(
strlen(name1) + strlen(name2) > 28)
            {
                
formatex(namecharsmax(name), "%.12s.. + %.12s.."name1name2);
            }
            else
            {
                
formatex(namecharsmax(name), "%s + %s"name1name2);
            }
           
            
message_begin(MSG_ALLSVC_UPDATEUSERINFO);
            
write_byte(killerEntIndex 1);
            
write_long(get_user_userid(killerEntIndex));
            
write_char('\');
            write_char('
n');
            write_char('
a');
            write_char('
m');
            write_char('
e');
            write_char('
\');
            write_string(name);
            for(new i = 0; i < 16; i++)
                write_byte(0);
            message_end();

            EnableHookChain(g_deathNoticePostHook);
        }
    }
}

public OnDeathNotice_Post(victimEntIndex, killerEntIndex, inflictorEntIndex)
{
    rh_update_user_info(killerEntIndex);
    DisableHookChain(g_deathNoticePostHook);

[Imagen: b_350_20_323957_202743_f19a15_111111.png]

(18/11/2014, 05:47 PM)Neeeeeeeeeel.- escribió: Por qué necesitan una guía para todo? Meté mano y que salga lo que salga... es la mejor forma de aprender.

(16/05/2016, 11:08 PM)kikizon2 escribió: No cabe duda que tienen mierda en vez de cerebro, par de pendejos v:
Responder
#3
Fotografía 
(12/04/2022, 12:58 PM)OsweRRR escribió: Tengo este que usa reapi, lo tenia adaptado a un mod por eso no trae autor, pero creditos a quien corresponda

Código PHP:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <reapi>

new Float:g_playerDamage[MAX_PLAYERS 1][MAX_PLAYERS 1];
new 
HookChain:g_deathNoticePostHook;

public 
plugin_init()
{
 
RegisterHookChain(RG_CBasePlayer_Spawn"OnPlayerSpawn_Post"true);
 
RegisterHookChain(RG_CBasePlayer_TakeDamage"OnPlayerTakeDamage_Post"true);
 
RegisterHookChain(RG_CSGameRules_DeathNotice"OnDeathNotice"false);
 
DisableHookChain((g_deathNoticePostHook RegisterHookChain(RG_CSGameRules_DeathNotice"OnDeathNotice_Post"true)));
}

public 
client_connect(playerEntIndex)
{
 
arrayset(_:g_playerDamage[playerEntIndex], 0sizeof(g_playerDamage[]));
}

public 
OnPlayerSpawn_Post(playerEntIndex)
{
 for(new 
1<= MaxClientsi++)
 {
 
g_playerDamage[i][playerEntIndex] = 0.0;
 }
}

public 
OnPlayerTakeDamage_Post(playerEntIndexinflictorEntIndexattackerEntIndexFloat:damagedamageType)
{
 if(
attackerEntIndex != playerEntIndex && is_user_connected(attackerEntIndex) && rg_is_player_can_takedamage(attackerEntIndexplayerEntIndex))
 {
 
g_playerDamage[attackerEntIndex][playerEntIndex] += damage;
 }
}

public 
OnDeathNotice(victimEntIndexkillerEntIndexinflictorEntIndex)
{
 if(
killerEntIndex != victimEntIndex && is_user_connected(killerEntIndex) && rg_is_player_can_takedamage(killerEntIndexvictimEntIndex))
 {
 new 
bestAttackerEntIndex 0;
 for(new 
1Float:maxDamage<= MaxClientsi++)
 {
 if(
g_playerDamage[i][victimEntIndex] > maxDamage)
 {
 
maxDamage g_playerDamage[i][victimEntIndex];
 
bestAttackerEntIndex i;
 }
 }
 
 if(
bestAttackerEntIndex != killerEntIndex && is_user_connected(bestAttackerEntIndex) && rg_is_player_can_takedamage(bestAttackerEntIndexvictimEntIndex) && get_member(bestAttackerEntIndexm_iTeam) != TEAM_SPECTATOR)
 {
 new 
name1[MAX_NAME_LENGTH], name2[MAX_NAME_LENGTH], name[MAX_NAME_LENGTH];
 
 
get_entvar(killerEntIndexvar_netnamename1charsmax(name1));
 
get_entvar(bestAttackerEntIndexvar_netnamename2charsmax(name2));
 
 
rg_add_account(bestAttackerEntIndex300);
 
 
set_entvar(bestAttackerEntIndexvar_fragsFloat:get_entvar(bestAttackerEntIndexvar_frags) + 1.0);
 
 if(
strlen(name1) + strlen(name2) > 28)
 {
 
formatex(namecharsmax(name), "%.12s.. + %.12s.."name1name2);
 }
 else
 {
 
formatex(namecharsmax(name), "%s + %s"name1name2);
 }
 
  
 message_begin
(MSG_ALLSVC_UPDATEUSERINFO);
 
write_byte(killerEntIndex 1);
 
write_long(get_user_userid(killerEntIndex));
 
write_char('\');
 write_char('
n');
 write_char('
a');
 write_char('
m');
 write_char('
e');
 write_char('
\');
 write_string(name);
 for(new i = 0; i < 16; i++)
 write_byte(0);
 message_end();

 EnableHookChain(g_deathNoticePostHook);
 }
 }
}

public OnDeathNotice_Post(victimEntIndex, killerEntIndex, inflictorEntIndex)
{
 rh_update_user_info(killerEntIndex);
 DisableHookChain(g_deathNoticePostHook);


Puede ser que tenga mal una linea o mi compilador esta desactualizado ?
[Imagen: error.png]


Archivos adjuntos Miniatura(s)
   
Responder
#4
Reemplaza
Código PHP:
MAX_PLAYERS 
por "33" ¿?, corregirme de ser lo contrario
quedaría:
Código PHP:
new Float:g_playerDamage[33][33]; 
Responder
#5
proba ahora, debe de compilar para amxx 1.8.2

Código PHP:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <reapi>

new Float:g_playerDamage[33][33];
new 
HookChain:g_deathNoticePostHook;
new 
g_iMaxPlayers

public plugin_init()
{
    
RegisterHookChain(RG_CBasePlayer_Spawn"OnPlayerSpawn_Post"true);
    
RegisterHookChain(RG_CBasePlayer_TakeDamage"OnPlayerTakeDamage_Post"true);
    
RegisterHookChain(RG_CSGameRules_DeathNotice"OnDeathNotice"false);
    
DisableHookChain((g_deathNoticePostHook RegisterHookChain(RG_CSGameRules_DeathNotice"OnDeathNotice_Post"true)));
    
    
g_iMaxPlayers get_maxplayers();
}

public 
client_connect(playerEntIndex)
{
    
arrayset(_:g_playerDamage[playerEntIndex], 0sizeof(g_playerDamage[]));
}

public 
OnPlayerSpawn_Post(playerEntIndex)
{
    for(new 
1<= g_iMaxPlayersi++)
    {
        
g_playerDamage[i][playerEntIndex] = 0.0;
    }
}

public 
OnPlayerTakeDamage_Post(playerEntIndexinflictorEntIndexattackerEntIndexFloat:damagedamageType)
{
    if(
attackerEntIndex != playerEntIndex && is_user_connected(attackerEntIndex) && rg_is_player_can_takedamage(attackerEntIndexplayerEntIndex))
    {
        
g_playerDamage[attackerEntIndex][playerEntIndex] += damage;
    }
}

public 
OnDeathNotice(victimEntIndexkillerEntIndexinflictorEntIndex)
{
    if(
killerEntIndex != victimEntIndex && is_user_connected(killerEntIndex) && rg_is_player_can_takedamage(killerEntIndexvictimEntIndex))
    {
        new 
bestAttackerEntIndex 0;
        for(new 
1Float:maxDamage<= g_iMaxPlayersi++)
        {
            if(
g_playerDamage[i][victimEntIndex] > maxDamage)
            {
                
maxDamage g_playerDamage[i][victimEntIndex];
                
bestAttackerEntIndex i;
            }
        }
        
        if(
bestAttackerEntIndex != killerEntIndex && is_user_connected(bestAttackerEntIndex) && rg_is_player_can_takedamage(bestAttackerEntIndexvictimEntIndex) && get_member(bestAttackerEntIndexm_iTeam) != TEAM_SPECTATOR)
        {
            new 
name1[MAX_NAME_LENGTH], name2[MAX_NAME_LENGTH], name[MAX_NAME_LENGTH];
            
            
get_entvar(killerEntIndexvar_netnamename1charsmax(name1));
            
get_entvar(bestAttackerEntIndexvar_netnamename2charsmax(name2));
            
            
rg_add_account(bestAttackerEntIndex300);
            
            
set_entvar(bestAttackerEntIndexvar_fragsFloat:get_entvar(bestAttackerEntIndexvar_frags) + 1.0);
            
            if(
strlen(name1) + strlen(name2) > 28)
            {
                
formatex(namecharsmax(name), "%.12s.. + %.12s.."name1name2);
            }
            else
            {
                
formatex(namecharsmax(name), "%s + %s"name1name2);
            }
           
            
message_begin(MSG_ALLSVC_UPDATEUSERINFO);
            
write_byte(killerEntIndex 1);
            
write_long(get_user_userid(killerEntIndex));
            
write_char('\');
            write_char('
n');
            write_char('
a');
            write_char('
m');
            write_char('
e');
            write_char('
\');
            write_string(name);
            for(new i = 0; i < 16; i++)
                write_byte(0);
            message_end();

            EnableHookChain(g_deathNoticePostHook);
        }
    }
}

public OnDeathNotice_Post(victimEntIndex, killerEntIndex, inflictorEntIndex)
{
    rh_update_user_info(killerEntIndex);
    DisableHookChain(g_deathNoticePostHook);

[Imagen: b_350_20_323957_202743_f19a15_111111.png]

(18/11/2014, 05:47 PM)Neeeeeeeeeel.- escribió: Por qué necesitan una guía para todo? Meté mano y que salga lo que salga... es la mejor forma de aprender.

(16/05/2016, 11:08 PM)kikizon2 escribió: No cabe duda que tienen mierda en vez de cerebro, par de pendejos v:
Responder
#6
(12/04/2022, 10:00 PM)OsweRRR escribió: proba ahora, debe de compilar para amxx 1.8.2

Código PHP:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <reapi>

new Float:g_playerDamage[33][33];
new 
HookChain:g_deathNoticePostHook;
new 
g_iMaxPlayers

public plugin_init()
{
 
RegisterHookChain(RG_CBasePlayer_Spawn"OnPlayerSpawn_Post"true);
 
RegisterHookChain(RG_CBasePlayer_TakeDamage"OnPlayerTakeDamage_Post"true);
 
RegisterHookChain(RG_CSGameRules_DeathNotice"OnDeathNotice"false);
 
DisableHookChain((g_deathNoticePostHook RegisterHookChain(RG_CSGameRules_DeathNotice"OnDeathNotice_Post"true)));
 
 
g_iMaxPlayers get_maxplayers();
}

public 
client_connect(playerEntIndex)
{
 
arrayset(_:g_playerDamage[playerEntIndex], 0sizeof(g_playerDamage[]));
}

public 
OnPlayerSpawn_Post(playerEntIndex)
{
 for(new 
1<= g_iMaxPlayersi++)
 {
 
g_playerDamage[i][playerEntIndex] = 0.0;
 }
}

public 
OnPlayerTakeDamage_Post(playerEntIndexinflictorEntIndexattackerEntIndexFloat:damagedamageType)
{
 if(
attackerEntIndex != playerEntIndex && is_user_connected(attackerEntIndex) && rg_is_player_can_takedamage(attackerEntIndexplayerEntIndex))
 {
 
g_playerDamage[attackerEntIndex][playerEntIndex] += damage;
 }
}

public 
OnDeathNotice(victimEntIndexkillerEntIndexinflictorEntIndex)
{
 if(
killerEntIndex != victimEntIndex && is_user_connected(killerEntIndex) && rg_is_player_can_takedamage(killerEntIndexvictimEntIndex))
 {
 new 
bestAttackerEntIndex 0;
 for(new 
1Float:maxDamage<= g_iMaxPlayersi++)
 {
 if(
g_playerDamage[i][victimEntIndex] > maxDamage)
 {
 
maxDamage g_playerDamage[i][victimEntIndex];
 
bestAttackerEntIndex i;
 }
 }
 
 if(
bestAttackerEntIndex != killerEntIndex && is_user_connected(bestAttackerEntIndex) && rg_is_player_can_takedamage(bestAttackerEntIndexvictimEntIndex) && get_member(bestAttackerEntIndexm_iTeam) != TEAM_SPECTATOR)
 {
 new 
name1[MAX_NAME_LENGTH], name2[MAX_NAME_LENGTH], name[MAX_NAME_LENGTH];
 
 
get_entvar(killerEntIndexvar_netnamename1charsmax(name1));
 
get_entvar(bestAttackerEntIndexvar_netnamename2charsmax(name2));
 
 
rg_add_account(bestAttackerEntIndex300);
 
 
set_entvar(bestAttackerEntIndexvar_fragsFloat:get_entvar(bestAttackerEntIndexvar_frags) + 1.0);
 
 if(
strlen(name1) + strlen(name2) > 28)
 {
 
formatex(namecharsmax(name), "%.12s.. + %.12s.."name1name2);
 }
 else
 {
 
formatex(namecharsmax(name), "%s + %s"name1name2);
 }
 
  
 message_begin
(MSG_ALLSVC_UPDATEUSERINFO);
 
write_byte(killerEntIndex 1);
 
write_long(get_user_userid(killerEntIndex));
 
write_char('\');
 write_char('
n');
 write_char('
a');
 write_char('
m');
 write_char('
e');
 write_char('
\');
 write_string(name);
 for(new i = 0; i < 16; i++)
 write_byte(0);
 message_end();

 EnableHookChain(g_deathNoticePostHook);
 }
 }
}

public OnDeathNotice_Post(victimEntIndex, killerEntIndex, inflictorEntIndex)
{
 rh_update_user_info(killerEntIndex);
 DisableHookChain(g_deathNoticePostHook);

Pregunta obvia.. vos lo pudiste compilar sin problemas ?


Archivos adjuntos Miniatura(s)
   
Responder
#7
(12/04/2022, 08:44 PM)Gstrigl escribió: Puede ser que tenga mal una linea o mi compilador esta desactualizado ?
[Imagen: error.png]

(12/04/2022, 10:38 PM)Gstrigl escribió: Pregunta obvia.. vos lo pudiste compilar sin problemas ?

Cambia MAX_NAME_LENGTH por 32.
Responder
#8
Dios santo quien usa amxx 1.8.2 en 2022, cambia MAX_NAME_LENGTH por 32 o 33 o agrega esto arriba de plugin_init(), justo debajo de new g_iMaxPlayers

Código PHP:
#define MAX_NAME_LENGTH 33 
[Imagen: b_350_20_323957_202743_f19a15_111111.png]

(18/11/2014, 05:47 PM)Neeeeeeeeeel.- escribió: Por qué necesitan una guía para todo? Meté mano y que salga lo que salga... es la mejor forma de aprender.

(16/05/2016, 11:08 PM)kikizon2 escribió: No cabe duda que tienen mierda en vez de cerebro, par de pendejos v:
Responder
#9
(12/04/2022, 11:21 PM)OsweRRR escribió: Dios santo quien usa amxx 1.8.2 en 2022, cambia MAX_NAME_LENGTH por 32 o 33 o agrega esto arriba de plugin_init(), justo debajo de new g_iMaxPlayers

Código PHP:
#define MAX_NAME_LENGTH 33 

XD
--
ya ni le deberían de dar soporte a ese tipo, siempre sale con algún comentario así
[Imagen: zcsztw-4.png] [Imagen: 6u5fj2-4.png]
[Imagen: linkedin_thumb_image.png][Imagen: 76561198283253977.png][Imagen: linkedin_thumb_image.png]
Responder
#10
(13/04/2022, 03:00 AM)Hinami escribió: XD
--
ya ni le deberían de dar soporte a ese tipo, siempre sale con algún comentario así

Tranquilo, sentate y tomate un cafe con leche.

(12/04/2022, 11:21 PM)OsweRRR escribió: Dios santo quien usa amxx 1.8.2 en 2022, cambia MAX_NAME_LENGTH por 32 o 33 o agrega esto arriba de plugin_init(), justo debajo de new g_iMaxPlayers

Código PHP:
#define MAX_NAME_LENGTH 33 
Código PHP:
Dios santo quien usa amxx 1.8.2 en 2022 
Alguien que no esta en el tema?
Gracias ya funciono !

(12/04/2022, 10:00 PM)OsweRRR escribió: proba ahora, debe de compilar para amxx 1.8.2

Código PHP:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <reapi>

new Float:g_playerDamage[33][33];
new 
HookChain:g_deathNoticePostHook;
new 
g_iMaxPlayers

public plugin_init()
{
 
RegisterHookChain(RG_CBasePlayer_Spawn"OnPlayerSpawn_Post"true);
 
RegisterHookChain(RG_CBasePlayer_TakeDamage"OnPlayerTakeDamage_Post"true);
 
RegisterHookChain(RG_CSGameRules_DeathNotice"OnDeathNotice"false);
 
DisableHookChain((g_deathNoticePostHook RegisterHookChain(RG_CSGameRules_DeathNotice"OnDeathNotice_Post"true)));
 
 
g_iMaxPlayers get_maxplayers();
}

public 
client_connect(playerEntIndex)
{
 
arrayset(_:g_playerDamage[playerEntIndex], 0sizeof(g_playerDamage[]));
}

public 
OnPlayerSpawn_Post(playerEntIndex)
{
 for(new 
1<= g_iMaxPlayersi++)
 {
 
g_playerDamage[i][playerEntIndex] = 0.0;
 }
}

public 
OnPlayerTakeDamage_Post(playerEntIndexinflictorEntIndexattackerEntIndexFloat:damagedamageType)
{
 if(
attackerEntIndex != playerEntIndex && is_user_connected(attackerEntIndex) && rg_is_player_can_takedamage(attackerEntIndexplayerEntIndex))
 {
 
g_playerDamage[attackerEntIndex][playerEntIndex] += damage;
 }
}

public 
OnDeathNotice(victimEntIndexkillerEntIndexinflictorEntIndex)
{
 if(
killerEntIndex != victimEntIndex && is_user_connected(killerEntIndex) && rg_is_player_can_takedamage(killerEntIndexvictimEntIndex))
 {
 new 
bestAttackerEntIndex 0;
 for(new 
1Float:maxDamage<= g_iMaxPlayersi++)
 {
 if(
g_playerDamage[i][victimEntIndex] > maxDamage)
 {
 
maxDamage g_playerDamage[i][victimEntIndex];
 
bestAttackerEntIndex i;
 }
 }
 
 if(
bestAttackerEntIndex != killerEntIndex && is_user_connected(bestAttackerEntIndex) && rg_is_player_can_takedamage(bestAttackerEntIndexvictimEntIndex) && get_member(bestAttackerEntIndexm_iTeam) != TEAM_SPECTATOR)
 {
 new 
name1[MAX_NAME_LENGTH], name2[MAX_NAME_LENGTH], name[MAX_NAME_LENGTH];
 
 
get_entvar(killerEntIndexvar_netnamename1charsmax(name1));
 
get_entvar(bestAttackerEntIndexvar_netnamename2charsmax(name2));
 
 
rg_add_account(bestAttackerEntIndex300);
 
 
set_entvar(bestAttackerEntIndexvar_fragsFloat:get_entvar(bestAttackerEntIndexvar_frags) + 1.0);
 
 if(
strlen(name1) + strlen(name2) > 28)
 {
 
formatex(namecharsmax(name), "%.12s.. + %.12s.."name1name2);
 }
 else
 {
 
formatex(namecharsmax(name), "%s + %s"name1name2);
 }
 
  
 message_begin
(MSG_ALLSVC_UPDATEUSERINFO);
 
write_byte(killerEntIndex 1);
 
write_long(get_user_userid(killerEntIndex));
 
write_char('\');
 write_char('
n');
 write_char('
a');
 write_char('
m');
 write_char('
e');
 write_char('
\');
 write_string(name);
 for(new i = 0; i < 16; i++)
 write_byte(0);
 message_end();

 EnableHookChain(g_deathNoticePostHook);
 }
 }
}

public OnDeathNotice_Post(victimEntIndex, killerEntIndex, inflictorEntIndex)
{
 rh_update_user_info(killerEntIndex);
 DisableHookChain(g_deathNoticePostHook);


Hola!
Acabo de probar el plugin, lo tengo corriendo pero no muestra las asistencias..
Responder


Salto de foro:


Usuarios navegando en este tema: 1 invitado(s)