Mensajes: 20
Temas: 6
Registro en: Mar 2021
Reputación:
0
11/05/2022, 05:34 AM
E probado este plugin para no sumar puntos al plantar/defusar pero igual me registra los puntos al hacer lo antes mencionado, alguna ayuda?
AlliedModders - View Single Post - Frag Bonus Problem (alliedmods.net)
Mensajes: 300
Temas: 14
Registro en: Dec 2017
Reputación:
6
11/05/2022, 10:38 AM
(Última modificación: 11/05/2022, 10:38 AM por rojedafeik.)
Prueba
Código PHP: /* Plugin generated by AMXX-Studio */
//EXTRAIDO DE https://github.com/Sugisakii/FPUG-AMXX
#include <amxmodx> #include <reapi>
#define PLUGIN "New Plug-In" #define VERSION "1.0" #define AUTHOR "author"
new g_iPlanter;
public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) RegisterHookChain(RG_CGrenade_DefuseBombEnd, "OnDefuseBomb", 1) RegisterHookChain(RG_CGrenade_ExplodeBomb, "OnBombExplode", 1) RegisterHookChain(RG_PlantBomb, "OnPlantBomb", 1) }
public OnPlantBomb(id) { g_iPlanter = id }
public OnDefuseBomb(ent, id, bool:bDefused) { if(bDefused) set_entvar(id, var_frags, Float:get_entvar(id, var_frags) - 3.0); }
public OnBombExplode(ent) { if(is_user_connected(g_iPlanter)) set_entvar(g_iPlanter, var_frags, Float:get_entvar(g_iPlanter, var_frags) - 3.0); }
"Cada golpe es una lección, y cada lección te hace mejor."
Mensajes: 20
Temas: 6
Registro en: Mar 2021
Reputación:
0
(11/05/2022, 10:38 AM)rojedafeik escribió: Prueba
Código PHP: /* Plugin generated by AMXX-Studio */
//EXTRAIDO DE https://github.com/Sugisakii/FPUG-AMXX
#include <amxmodx> #include <reapi>
#define PLUGIN "New Plug-In" #define VERSION "1.0" #define AUTHOR "author"
new g_iPlanter;
public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) RegisterHookChain(RG_CGrenade_DefuseBombEnd, "OnDefuseBomb", 1) RegisterHookChain(RG_CGrenade_ExplodeBomb, "OnBombExplode", 1) RegisterHookChain(RG_PlantBomb, "OnPlantBomb", 1) }
public OnPlantBomb(id) { g_iPlanter = id }
public OnDefuseBomb(ent, id, bool:bDefused) { if(bDefused) set_entvar(id, var_frags, Float:get_entvar(id, var_frags) - 3.0); }
public OnBombExplode(ent) { if(is_user_connected(g_iPlanter)) set_entvar(g_iPlanter, var_frags, Float:get_entvar(g_iPlanter, var_frags) - 3.0); }
Sigue dando los 3 puntos por plantar/defusar
Mensajes: 1,450
Temas: 59
Registro en: Feb 2015
Reputación:
20
Código PHP: #include <amxmodx>
#include <reapi>
#define IsPlayer(%0) ( 1 <= %0 <= MAX_PLAYERS )
#define GetPlayerBit(%0,%1) ( IsPlayer(%1) && ( %0 & ( 1 << ( %1 & 31 ) ) ) ) #define SetPlayerBit(%0,%1) ( IsPlayer(%1) && ( %0 |= ( 1 << ( %1 & 31 ) ) ) ) #define ClearPlayerBit(%0,%1) ( IsPlayer(%1) && ( %0 &= ~( 1 << ( %1 & 31 ) ) ) )
#define IsBombPlanter(%0) ( g_iIsPlanter == %0 )
new g_iIsConnected; new g_iIsPlanter;
public plugin_init( ) { register_plugin( "No score defusing/exploding C4", "1.0", "metita" );
RegisterHookChain( RG_PlantBomb, "OnPlayerPlantBomb_Post", true ); RegisterHookChain( RG_CGrenade_ExplodeBomb, "OnGrenadeExplodeBomb_Post", true ); RegisterHookChain( RG_CGrenade_DefuseBombEnd, "OnGrenadeDefuseBomb_Post", true ); }
public client_putinserver( iId ) { SetPlayerBit( g_iIsConnected, iId ); }
public client_disconnected( iId ) { if ( !GetPlayerBit( g_iIsConnected, iId ) ) { return; }
ClearPlayerBit( g_iIsConnected, iId );
if( IsBombPlanter( iId ) ) { g_iIsPlanter = 0; } }
public OnPlayerPlantBomb_Post( iId, Float:flStart[ 3 ], Float:flVelocity[ 3 ] ) { if ( !GetPlayerBit( g_iIsConnected, iId ) ) { return HC_CONTINUE; }
g_iIsPlanter = iId;
return HC_CONTINUE; }
public OnGrenadeExplodeBomb_Post( iEnt ) { if ( !GetPlayerBit( g_iIsConnected, g_iIsPlanter ) ) { return HC_CONTINUE; }
set_entvar( g_iIsPlanter, var_frags, Float:get_entvar( g_iIsPlanter, var_frags ) - 3.0 );
return HC_CONTINUE; }
public OnGrenadeDefuseBomb_Post( iId, iPlayer, bool:bDefused ) { if ( !GetPlayerBit( g_iIsConnected, iPlayer ) ) { return HC_CONTINUE; }
if( bDefused ) { set_entvar( iPlayer, var_frags, Float:get_entvar( iPlayer, var_frags ) - 3.0 ); }
return HC_CONTINUE; }
Mensajes: 20
Temas: 6
Registro en: Mar 2021
Reputación:
0
(11/05/2022, 06:59 PM)metita escribió: Código PHP: #include <amxmodx>
#include <reapi>
#define IsPlayer(%0) ( 1 <= %0 <= MAX_PLAYERS )
#define GetPlayerBit(%0,%1) ( IsPlayer(%1) && ( %0 & ( 1 << ( %1 & 31 ) ) ) ) #define SetPlayerBit(%0,%1) ( IsPlayer(%1) && ( %0 |= ( 1 << ( %1 & 31 ) ) ) ) #define ClearPlayerBit(%0,%1) ( IsPlayer(%1) && ( %0 &= ~( 1 << ( %1 & 31 ) ) ) )
#define IsBombPlanter(%0) ( g_iIsPlanter == %0 )
new g_iIsConnected; new g_iIsPlanter;
public plugin_init( ) { register_plugin( "No score defusing/exploding C4", "1.0", "metita" );
RegisterHookChain( RG_PlantBomb, "OnPlayerPlantBomb_Post", true ); RegisterHookChain( RG_CGrenade_ExplodeBomb, "OnGrenadeExplodeBomb_Post", true ); RegisterHookChain( RG_CGrenade_DefuseBombEnd, "OnGrenadeDefuseBomb_Post", true ); }
public client_putinserver( iId ) { SetPlayerBit( g_iIsConnected, iId ); }
public client_disconnected( iId ) { if ( !GetPlayerBit( g_iIsConnected, iId ) ) { return; }
ClearPlayerBit( g_iIsConnected, iId );
if( IsBombPlanter( iId ) ) { g_iIsPlanter = 0; } }
public OnPlayerPlantBomb_Post( iId, Float:flStart[ 3 ], Float:flVelocity[ 3 ] ) { if ( !GetPlayerBit( g_iIsConnected, iId ) ) { return HC_CONTINUE; }
g_iIsPlanter = iId;
return HC_CONTINUE; }
public OnGrenadeExplodeBomb_Post( iEnt ) { if ( !GetPlayerBit( g_iIsConnected, g_iIsPlanter ) ) { return HC_CONTINUE; }
set_entvar( g_iIsPlanter, var_frags, Float:get_entvar( g_iIsPlanter, var_frags ) - 3.0 );
return HC_CONTINUE; }
public OnGrenadeDefuseBomb_Post( iId, iPlayer, bool:bDefused ) { if ( !GetPlayerBit( g_iIsConnected, iPlayer ) ) { return HC_CONTINUE; }
if( bDefused ) { set_entvar( iPlayer, var_frags, Float:get_entvar( iPlayer, var_frags ) - 3.0 ); }
return HC_CONTINUE; }
Sigue sin funcionar
Mensajes: 1,450
Temas: 59
Registro en: Feb 2015
Reputación:
20
¿Seguro? Es un extracto de código de un modo publico, esta todo probado y deberia andar, probaste viendo tu scoreboard POST ronda?
Mensajes: 20
Temas: 6
Registro en: Mar 2021
Reputación:
0
12/05/2022, 05:24 AM
(Última modificación: 12/05/2022, 05:46 AM por xlrenatolx. Edited 2 times in total.)
(12/05/2022, 04:55 AM)metita escribió: ¿Seguro? Es un extracto de código de un modo publico, esta todo probado y deberia andar, probaste viendo tu scoreboard POST ronda?
Me hiciste probar de varias formas y me doy cuenta que cuando mando la cfg pregame el plugin funciona pero cuando mando la clasica cfg lo3 ya no funciona el plugin.
Como podría solucionarlo?
Mensajes: 659
Temas: 97
Registro en: Feb 2016
Reputación:
12
eso deberia estar pasando porque desactivas el amxx supongo
Mensajes: 20
Temas: 6
Registro en: Mar 2021
Reputación:
0
Mensajes: 138
Temas: 39
Registro en: Jul 2020
Reputación:
1
Probá agregando este code, adentro del .sma
Código PHP: public plugin_cfg() if(is_plugin_loaded("Pause Plugins") != -1) server_cmd("amx_pausecfg add ^"%s^"", PLUGIN)
(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: 20
Temas: 6
Registro en: Mar 2021
Reputación:
0
(13/05/2022, 02:15 PM)Nacalau escribió: Probá agregando este code, adentro del .sma
Código PHP: public plugin_cfg() if(is_plugin_loaded("Pause Plugins") != -1) server_cmd("amx_pausecfg add ^"%s^"", PLUGIN)
Sigue sin funcionar, solo funciona cuando esta el modo pregame :/
Mensajes: 144
Temas: 4
Registro en: Mar 2018
Reputación:
8
(22/05/2020, 08:35 PM)acetatomil escribió: Metodo 1)
En el .sma del plugin, agregas:
En
Código PHP: server_cmd("amx_pausecfg add ^"%s^"", PLUGIN);
Metodo 2)
vas a: addons/amxmodx/configs/ y abris "amxx.cfg" y agregas abajo de todo:
amx_pausecfg add "nombreplugin" (solo nombre, sin .amxx al final)
|