Mensajes: 225
Temas: 15
Registro en: Oct 2013
Reputación:
1
Zombie Plague Addon: Estadisticas de la ronda
Descripcion Cita: Con este plugin se muestra un hud al final de la ronda con los ammopacks ganados en la ronda y con los ammopacks totales, el jugador con mayor recaudación sera premiado con una cantidad de ammopacks x donde x es el valor de la cvar "zp_recompensa_mejor_ronda ".
Includes Cita: amxmodx
hamsandwich
zombieplague
Plugins requeridos Cita: Zombie Plague
Configuración Cita: zp_recompensa_mejor_ronda "5" // Entre "" premio en cantidad de ammopacks al mejor de la ronda.
Archivos adjuntos
Descargar AMXX / zp_mejor_ronda.sma (Tamaño: 2.65 KB / Descargas: 664)
Mensajes: 996
Temas: 11
Registro en: Oct 2013
Reputación:
20
No soy de jugar zp ni de codear, pero me parece una idea bastante buena.
Mensajes: 225
Temas: 15
Registro en: Oct 2013
Reputación:
1
La verdad que lo puse por que un amigo me lo pidió y lo empece a hacer y supongo que a mas de alguien le servirá, ademas es como para que vaya llegando mas gente, ya que los de alliedmodders no tienen Spanish Section.
Mensajes: 843
Temas: 303
Registro en: Oct 2013
Reputación:
2
Muy bueno, gracias por aportar..
Mensajes: 4,637
Temas: 73
Registro en: Oct 2013
Reputación:
44
Simple y no lo había visto antes.
Aprobado.
Mensajes: 262
Temas: 10
Registro en: Dec 2013
Reputación:
3
24/04/2014, 05:31 PM
(Última modificación: 02/05/2014, 05:09 AM por kev1 .)
Alguien qme ayuda a adaptarlo a ZA ?
EDIT: Solucionado
Mensajes: 68
Temas: 28
Registro en: Apr 2014
Reputación:
0
Wow tengo un zp de niveles por ammopacks y me sirve mucho asi todos hacen lo posible por matar a los zombies o humanos xD Gracias :p
No firma[/color]
Mensajes: 613
Temas: 78
Registro en: Dec 2013
Reputación:
12
Me parece buena la idea de que te de los aps al terminar la ronda;
pero creo que lo he visto antes en algunos ZP:
creo que era asi
Evil spiret: Daño 200 - Aps ganados 100 - Frags 7
Algo asi, iba de mayor a menor en 5 lugares. Quien habia hecho mas daño , matado mas , etc
Seguro uso tu plugin ; muchas gracias por aportarlo
NUEVO ZOMBIE PLAGUE + LVLS!! UNETE A LA COMUNIDAD
Mensajes: 12
Temas: 3
Registro en: Sep 2014
Reputación:
0
Gracias man, sirvio de mucha ayuda
)
Mensajes: 174
Temas: 59
Registro en: Apr 2014
Reputación:
2
Lo testee en 5.0 y me sale este log en debug
bueno y ademas del log tampoco me funciona como tal no sale el hud .
Código PHP:
L 11 / 05 / 2014 - 12 : 29 : 52 : Invalid CVAR pointer L 11 / 05 / 2014 - 12 : 29 : 52 : [ AMXX ] Displaying debug trace ( plugin "zp_mejor_ronda.amxx" ) L 11 / 05 / 2014 - 12 : 29 : 52 : [ AMXX ] Run time error 10 : native error ( native "get_pcvar_num" ) L 11 / 05 / 2014 - 12 : 29 : 52 : [ AMXX ] [ 0 ] zp_mejor_ronda . sma :: fw_TakeDamage ( line 54 )
Siempre dispuesto a aprendes cosas nuevas todos los días
Mensajes: 843
Temas: 303
Registro en: Oct 2013
Reputación:
2
05/11/2014, 11:37 PM
(Última modificación: 06/11/2014, 03:31 AM por wicho .)
El problema es que el 5.0 no usa esos cvars pointers o sea estos zp_human_damage_reward y zp_surv_ignore_rewards, y es mejor usar las natives del 5.0 cuando llegue a mi casa te ayudo..
P.S: proba..
Código PHP:
/* Plugin generated by AMXX-Studio */ #include <amxmodx> #include <hamsandwich> #include <zp50_core> #include <zp50_class_survivor> #include <zp50_ammopacks> #include <zp50_gamemodes> #define PLUGIN "[ZP] Addon: Estadisticas de la ronda" #define VERSION "1.0" #define AUTHOR "LA BANDA" new g_AmmoPacksRound [ 33 ], g_damagedealt_human [ 33 ] enum _ : iMaxVars { AmmoDamage , SurvRewards , Recompensa } new iCvars [ iMaxVars ] new g_MsgSync public plugin_init () { register_plugin ( PLUGIN , VERSION , AUTHOR ) // Add your code here... RegisterHam ( Ham_TakeDamage , "player" , "fw_TakeDamage" ) iCvars [ AmmoDamage ] = get_cvar_pointer ( "zp_ammop_zombie_damaged_hp" ) iCvars [ SurvRewards ] = get_cvar_pointer ( "zp_ammop_survivor_ignore" ) iCvars [ Recompensa ] = register_cvar ( "zp_recompensa_mejor_ronda" , "5" ) // Ammopacks de recompensa al mejor de la ronda g_MsgSync = CreateHudSyncObj () } public client_putinserver ( id ) { g_damagedealt_human [ id ] = 0 g_AmmoPacksRound [ id ] = 0 } public fw_TakeDamage ( victim , inflictor , attacker , Float : damage , damage_type ) { if ( victim == attacker || !( 1 <= attacker <= get_maxplayers () && is_user_connected ( attacker ))) return HAM_IGNORED ; if ( zp_core_is_zombie ( attacker ) == zp_core_is_zombie ( victim )) return HAM_SUPERCEDE ; if ( zp_core_is_zombie ( attacker )) return HAM_IGNORED ; static xCvar ; xCvar = get_pcvar_num ( iCvars [ AmmoDamage ]) if ( xCvar && (! zp_class_survivor_get ( attacker ) || ! get_pcvar_num ( iCvars [ SurvRewards ]))) { g_damagedealt_human [ attacker ] += floatround ( damage ) while ( g_damagedealt_human [ attacker ] > xCvar ) { g_AmmoPacksRound [ attacker ]++ g_damagedealt_human [ attacker ] -= xCvar } } return HAM_IGNORED ; } public zp_fw_gamemodes_end ( game_mode_id ) { fnShowRoundHud () arrayset ( g_AmmoPacksRound , 0 , 33 ) } fnShowRoundHud () { if(! get_pcvar_num ( iCvars [ AmmoDamage ])) return new iPlayers [ 32 ], iNum ; get_players ( iPlayers , iNum ); if ( iNum < 2 ) return; new iMaxAmmo , iBestPlayer , id , xCvar ; xCvar = get_pcvar_num ( iCvars [ Recompensa ]) for (new i = 0 ; i < iNum ; i ++) { id = iPlayers [ i ]; if ( g_AmmoPacksRound [ id ] > iMaxAmmo ) { iBestPlayer = id ; iMaxAmmo = g_AmmoPacksRound [ iBestPlayer ] } set_hudmessage ( 0 , 100 , 255 , - 1.0 , 0.25 , 0 , 0.0 , 6.0 , 1.0 , 1.0 , - 1 ) ShowSyncHudMsg ( id , g_MsgSync , "Estadisticas de esta ronda^n^nGanaste %d ammopacks^nTienes %d Ammopacks" , g_AmmoPacksRound [ id ], zp_ammopacks_get ( id )); } get_user_name ( iBestPlayer , iPlayers , charsmax ( iPlayers )) zp_ammopacks_set ( iBestPlayer , zp_ammopacks_get ( iBestPlayer ) + xCvar ) client_print ( 0 , print_chat , "[ZP] Mejor jugador de la ronda: %s [Recompensa: %d Ammopacks]." , iPlayers , xCvar ) }
Mensajes: 174
Temas: 59
Registro en: Apr 2014
Reputación:
2
(05/11/2014, 11:37 PM) wicho escribió: El problema es que el 5.0 no usa esos cvars pointers o sea estos zp_human_damage_reward y zp_surv_ignore_rewards, y es mejor usar las natives del 5.0 cuando llegue a mi casa te ayudo..
P.S: proba..
Código PHP:
/* Plugin generated by AMXX-Studio */ #include <amxmodx> #include <hamsandwich> #include <zp50_core> #include <zp50_class_survivor> #include <zp50_ammopacks> #include <zp50_gamemodes> #define PLUGIN "[ZP] Addon: Estadisticas de la ronda" #define VERSION "1.0" #define AUTHOR "LA BANDA" new g_AmmoPacksRound [ 33 ], g_damagedealt_human [ 33 ] enum _ : iMaxVars { AmmoDamage , SurvRewards , Recompensa } new iCvars [ iMaxVars ] new g_MsgSync public plugin_init () { register_plugin ( PLUGIN , VERSION , AUTHOR ) // Add your code here... RegisterHam ( Ham_TakeDamage , "player" , "fw_TakeDamage" ) iCvars [ AmmoDamage ] = get_cvar_pointer ( "zp_ammop_zombie_damaged_hp" ) iCvars [ SurvRewards ] = get_cvar_pointer ( "zp_ammop_survivor_ignore" ) iCvars [ Recompensa ] = register_cvar ( "zp_recompensa_mejor_ronda" , "5" ) // Ammopacks de recompensa al mejor de la ronda g_MsgSync = CreateHudSyncObj () } public client_putinserver ( id ) { g_damagedealt_human [ id ] = 0 g_AmmoPacksRound [ id ] = 0 } public fw_TakeDamage ( victim , inflictor , attacker , Float : damage , damage_type ) { if ( victim == attacker || !( 1 <= attacker <= get_maxplayers () && is_user_connected ( attacker ))) return HAM_IGNORED ; if ( zp_core_is_zombie ( attacker ) == zp_core_is_zombie ( victim )) return HAM_SUPERCEDE ; if ( zp_core_is_zombie ( attacker )) return HAM_IGNORED ; static xCvar ; xCvar = get_pcvar_num ( iCvars [ AmmoDamage ]) if ( xCvar && (! zp_class_survivor_get ( attacker ) || ! get_pcvar_num ( iCvars [ SurvRewards ]))) { g_damagedealt_human [ attacker ] += floatround ( damage ) while ( g_damagedealt_human [ attacker ] > xCvar ) { g_AmmoPacksRound [ attacker ]++ g_damagedealt_human [ attacker ] -= xCvar } } return HAM_IGNORED ; } public zp_fw_gamemodes_end ( game_mode_id ) { fnShowRoundHud () arrayset ( g_AmmoPacksRound , 0 , 33 ) } fnShowRoundHud () { if(! get_pcvar_num ( iCvars [ AmmoDamage ])) return new iPlayers [ 32 ], iNum ; get_players ( iPlayers , iNum ); if ( iNum < 2 ) return; new iMaxAmmo , iBestPlayer , id , xCvar ; xCvar = get_pcvar_num ( iCvars [ Recompensa ]) for (new i = 0 ; i < iNum ; i ++) { id = iPlayers [ i ]; if ( g_AmmoPacksRound [ id ] > iMaxAmmo ) { iBestPlayer = id ; iMaxAmmo = g_AmmoPacksRound [ iBestPlayer ] } set_hudmessage ( 0 , 100 , 255 , - 1.0 , 0.25 , 0 , 0.0 , 6.0 , 1.0 , 1.0 , - 1 ) ShowSyncHudMsg ( id , g_MsgSync , "Estadisticas de esta ronda^n^nGanaste %d ammopacks^nTienes %d Ammopacks" , g_AmmoPacksRound [ id ], zp_ammopacks_get ( id )); } get_user_name ( iBestPlayer , iPlayers , charsmax ( iPlayers )) zp_ammopacks_set ( iBestPlayer , zp_ammopacks_get ( iBestPlayer ) + xCvar ) client_print ( 0 , print_chat , "[ZP] Mejor jugador de la ronda: %s [Recompensa: %d Ammopacks]." , iPlayers , xCvar ) }
esto me deja en los log
Código PHP:
L 11 / 06 / 2014 - 08: 12 : 49 : [ ZP ] Invalid Player ( 0 ) L 11 / 06 / 2014 - 08: 12 : 49 : [ AMXX ] Displaying debug trace ( plugin "zp_mejor_ronda.amxx" ) L 11 / 06 / 2014 - 08: 12 : 49 : [ AMXX ] Run time error 10 : native error ( native "zp_ammopacks_get" ) L 11 / 06 / 2014 - 08: 12 : 49 : [ AMXX ] [ 0 ] mejor_jugador_ronda . sma :: fnShowRoundHud ( line 104 ) L 11 / 06 / 2014 - 08: 12 : 49 : [ AMXX ] [ 1 ] mejor_jugador_ronda . sma :: zp_fw_gamemodes_end ( line 74 )
Siempre dispuesto a aprendes cosas nuevas todos los días
Mensajes: 3
Temas: 1
Registro en: Aug 2021
Reputación:
0
Quien adapta para basebuilder