/
Hola gente
De
Alliedmodders
/
Una informacion basicoa de rangos Exp+ reset, este plugin contiene una variedad de rangos sacados de "Halo: Reach", este contiende un sistema de exp para poder llegar al siguiente rango, todos los rangos piden 100 de exp, y cada vez que aumentas de rango es mas dicifil ganar exp, el sistema de resets. abres el menu con /reset, para poder hacer 1 reset debes tener el ultimo rango osea el rango numero 29, al dar reset se te resetea el rango a 0...
También este sistema de rangos contiene hp, y ammo por rangos, osea a medida que subes de rango te va aumentando tu vida, que pasa... cuando das 1 reset te resetea el hp y el ammo también, pero te agrega damage a todas las armas que es mucho mejor :3.
Tambien este sistema no tiene ningun tipo de bugs a la hora de los rangos maximos, si el administrador da por ejemplo el rango numero 50 que no existe... dira que el rango es mayor de 29 que es lo que pide igualmente con los resets
/creditos
Destro: por su adv_vault
Rojeda: Por darme los nombres de los rangos de halo: Reach
Chema: Por hacer el hook say
/
#define HUD (taskid-Task) /*[ Definimos el id del hud :3 ]*/
/*************************************\ *************************************** Armas a la que le daremos damage *************************************** \*************************************/ new Armas [ ] [ ] = {
new g_Plugin [ ] = "Rangos Exp + Reset"; //Ranos x Frags new g_version[ ] = "1.0";//Version new g_Autor [ ] = "Alejandro-."; //Autor new g_Tag [ ] = "!g[::!tSG!g::]"; //Tag de tu servidor new Rank_up [ ] = "rank_up.mp3"//Solo mp3 :3 new Reset_up [ ] = "reset_up.mp3"//Solo mp3 :3 new FileMax [ ] = "RangosMaximos.ini"; new RanksDar [ ] = "amx_Rango.ini"; new ResetMax [ ] = "ResetMaximos.ini"; new g_MAX_RANGOS = 29;
enum _:DATA_RANGOS { NAME [ 32 ], Kill, KillHS, HP, AMMO } /*************************************\ *************************************** Aqui podemos editar cada rango :3 *************************************** \*************************************/ new g_Rangos [ ] [ DATA_RANGOS ] =
{ /* [NOMBRE] [Kills] [Kills Hs][HP][CHALECO] */ { "Recluta", 20, 30, 100, 100 }, { "Soldado Raso", 18, 28, 102, 104 }, { "Cabo", 16, 24, 105, 110 }, { "Cabo Grado 1", 14, 22, 108, 116 }, { "Sargento", 12, 20, 110, 120 }, { "Sargento Grado 1", 10, 17, 112, 124 }, { "Sargento Grado 2", 8, 15, 116, 132 }, { "Subteniente", 6, 10, 120, 140 }, { "Subteniente Grado 1", 4, 8, 124, 148 }, { "Subteniente Grado 2", 4, 8, 126, 152 }, { "Capitán", 4, 8, 130, 160 }, { "Mayor", 4, 8, 136, 172 }, { "Teniente Coronel", 4, 8, 140, 180 }, { "Teniente Coronel Grado 1", 2, 5, 145, 190 }, { "Teniente Coronel Grado 2", 2, 5, 150, 200 }, { "Comandante", 2, 5, 155, 210 }, { "Coronel", 2, 5, 160, 220 }, { "Brigada", 2, 5, 165, 230 }, { "Brigada Grado 1", 2, 5, 170, 240 }, { "Brigada Grado 2", 2, 5, 175, 250 }, { "Brigada Grado 3", 2, 5, 180, 260 }, { "General", 2, 4, 185, 270 }, { "Leyenda", 2, 3, 190, 280 }, { "Mítico", 2, 3, 195, 290 }, { "Noble", 2, 3, 196, 292 }, { "Nova", 2, 3, 197, 294 }, { "Nova Grado 1", 2, 3, 198, 296 }, { "Nova Grado 2", 2, 3, 199, 298 }, { "Reclamador", 2, 3, 200, 300 }, { "Heredero", 1, 2, 200, 300 }, //Los rangos seran contados hata aqui este es el numero 29 y comienza desde el 0... { "RANGO MAXIMO", 0, 0, 200, 300 } // Este rango es para el bug del hud de Siguiente Rango: MAXIMO RANGO y de ay no pasara :3
}
/*************************************\ *************************************** Aqui editamos el damage del reset *************************************** \*************************************/ new Float:ResetDamage[ ] = { 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.8, 2.0, 2.2,2.5 } //10 Damages de 10 resets
new g_Rango [ 33 ], g_exp [ 33 ], g_rest[ 33 ];
/*************************************\ *************************************** Parcheamos los sonidos de rango y reset. *************************************** \*************************************/ public plugin_precache( ) { precache_sound(Rank_up) precache_sound(Reset_up)
}
/*************************************\ *************************************** Iniciamos el plugin *************************************** \*************************************/ public plugin_init ( ) { register_plugin( g_Plugin, g_version, g_Autor ) register_event( "DeathMsg", "EventFrags", "a" ); RegisterHam(Ham_TakeDamage, "player", "DamageR", 0) RegisterHam( Ham_Spawn,"player","RoundR",1 )
/*************************************\ *************************************** Mensaje al que tipee say /Rango *************************************** \*************************************/ public cmd_rango ( id ) {
ColorChat( id, "!yTu rangos es: !g( !t%s !g) !yy Exp. !g%d%%", g_Rangos [ g_Rango [ id ] ] [ NAME ], g_exp [ id ] )
}
/*************************************\ *************************************** Exp x Frags :3 *************************************** \*************************************/ public EventFrags() { new Atacante = read_data(1); new cabeza = read_data(3);
/*************************************\ *************************************** Chequeamos si ya puede aumentar de rangosi el user ya tiene los 100 de exp de cada rango, tendra su aumento. *************************************** \*************************************/ public Chequeo ( id ) { new Nombre [ 33 ]; get_user_name(id, Nombre, 32)
if ( g_exp [ id ] >= 100 ) { if( g_MAX_RANGOS > g_Rango [ id ]) { g_Rango [ id ] ++ g_exp [ id ] -= 100 client_cmd(id, "mp3 play sound/%s", Rank_up) ColorChat( 0, "!yEl jugador [ !t%s !y] aumento al rango: !g( !t%s !g)", Nombre, g_Rangos [ g_Rango [ id ] ] [ NAME ] )
} else { client_print(id, print_console,"( %s ) Ya tienes el maximo de rangos, no puedes aumentar mas :3", Nombre) log_to_file(FileMax, "( %s ) eh llegado al rango MAXIMO <3", Nombre ) }
} }
/*************************************\ *************************************** /PUTINSERVER/ *************************************** \*************************************/ public client_putinserver(id) { g_Rango [ id ] = 0 g_exp [ id ] = 0 set_task(1.0, "HudCentral", id + Task, _, _, "b") get_user_name(id, g_nombre[id], 31) Cargar(id) }
/*************************************\ *************************************** /HUD/ *************************************** \*************************************/ public HudCentral(taskid) { new id = HUD
set_hudmessage(185, 255, 0, 0.02, 0.16, 1, 6.0, 1.1, 0.0, 0.0, -1) ShowSyncHudMsg(HUD, RHUDS, "/--------------------------\^nRango: %s^nSig. Rango: %s^nExp: %d%%/100%%^nResets: %d/10^n\--------------------------/", g_Rangos [ g_Rango [ id ] ] [ NAME ], g_Rangos [ g_Rango [ id ] + 1 ] [ NAME ], g_exp [ id ], g_rest [ id ] ) }
/*************************************\ *************************************** /Ronda de rangos/ *************************************** \*************************************/ public RoundR( id ) { if( !is_user_alive( id ) ) return HAM_IGNORED; set_user_health(id, g_Rangos [ g_Rango [ id ] ] [ HP ]) set_user_armor(id, g_Rangos [ g_Rango [ id ] ] [ AMMO ]) return HAM_IGNORED; }
/*************************************\ *************************************** Cmd para dar rango, amx_rango "Name" "del 1 al 23 serian los rangos" ej. amx_rango "|Alejandro-." "18" seria rango "Brigada Grado 1" *************************************** \*************************************/ public dar_rango (id, level, cid) { if (!cmd_access(id, level, cid, 3)) return PLUGIN_HANDLED;
new arg[33], arg2[10]; read_argv(1, arg, charsmax(arg)) read_argv(2, arg2, charsmax(arg2))
new Player = cmd_target(id, arg,CMDTARGET_ONLY_ALIVE)
if (!Player) { ColorChat( id, "!yJugador no encontrado)") return PLUGIN_HANDLED; } if( g_MAX_RANGOS > g_Rango [ id ] ) { client_print(id, print_console,"le diste el rango ( %s ) El usuario ( %s )", g_Rangos [str_to_num(arg2)] [ NAME ], arg) g_Rango [ Player ] = str_to_num(arg2) client_cmd(id, "mp3 play sound/%s", Rank_up) ColorChat( 0, "!yEl administrador [ !t%s !y] le dio el rango: !g( !t%s !g) !y ah [ !t%s !y]", iNameAdmin, g_Rangos [ g_Rango [ id ] ] [ NAME ], arg ) log_to_file(RanksDar, "El administrador ( %s ) le dio el rango ( %s ) ", iNameAdmin, g_Rangos [str_to_num(arg2)] [ NAME ] ) } else client_print(id, print_console,"El usuario ( %s ) ya tiene el maximo de rangos", arg ) return PLUGIN_HANDLED; }
/*************************************\ *************************************** Menu para dar resets. *************************************** \*************************************/
public Menu_Resets ( id ) {
static menu, szMenu[1304];
formatex( szMenu, sizeof(szMenu), "\y|\r***********************\y|^n\w[::\ySG\w::] Hacer Reset^nBy: %s^nExp: %d%%^n\wRango ( \y%s\w )^n\y|\r***********************\y|", g_Autor, g_exp [ id ], g_Rangos [ g_Rango [ id ] ] [ NAME ] ); menu = menu_create(szMenu, "OpciMen"); if( g_MAX_RANGOS > g_Rango [ id ] ) { menu_additem(menu, "Resetear\y ( \rTE FALTAN RANGOS\y )", _, _, menu_makecallback("CallBack")); // case 0 } else { menu_additem(menu, "\yResetear", _, _, menu_makecallback("CallBack")); } menu_additem(menu, "Mis resets^n", "", 0); // case 1 menu_additem(menu, "Mi informacion", "", 0); // case 2
/*************************************\ *************************************** Callback de resets *************************************** \*************************************/ public CallBack (id, menu, item) { if( g_MAX_RANGOS > g_Rango [ id ] ) return ITEM_DISABLED;
return ITEM_ENABLED; } /*************************************\ *************************************** Verificamos si no tiene el maximo de resets *************************************** \*************************************/ public Verific(id){ if(g_rest [ id ] >= 10 ) { new Names [ 33 ]; get_user_name(id, Names, charsmax(Names)) ColorChat( id, "!yLlegaste al !g[ !yMAXIMO DE RESETS !g]") log_to_file(ResetMax, "El usuarios ( %s ) Llego a la cantidad maxima de resets", Names) } else { Menu_Resets ( id ) }
}
/*************************************\ *************************************** Opciones del menu *************************************** \*************************************/ public OpciMen(id, menu, item) { if(item == MENU_EXIT) { return PLUGIN_HANDLED; } switch(item) { case 0: { g_rest [ id ]++ g_Rango [ id ] = 0 g_exp [ id ] = 0 client_cmd(id, "mp3 play %s", Reset_up) client_cmd(id, "mp3 play sound/%s", Reset_up) ColorChat( id, "!yHiciste reset ahora tienes !g%d!t/!g10", g_rest [ id ])
} case 1: { ColorChat( id, "!yActualmente tienes !g%d!t/!g10", g_rest [ id ]) } case 2: { ColorChat( id, "!yRango: !g%s", g_Rangos [ g_Rango [ id ] ] [ NAME ]) ColorChat( id, "!yExp:!g %d%%", g_exp [ id ]) ColorChat( id, "!yResets: !g%d!t/!g10", g_rest [ id ]) ColorChat( id, "!yPor tener esas estadisticas tienes : !g%d !yde !tHP!y y !g%d !yde !tAMMO", g_Rangos [ g_Rango [ id ] ] [ HP ], g_Rangos [ g_Rango [ id ] ] [ AMMO ]) } }
menu_destroy(menu);
return PLUGIN_HANDLED; }
/*************************************\ *************************************** Damage x Reset *************************************** \*************************************/ public DamageR( victim, inflictor, attacker, Float:damage, damage_bits ) {
static i, team[ 11 ]; for( i = 0; i < get_maxplayers( ); i++ ) { if ( !is_user_connected( i ) ) continue;
if (is_user_admin( i ) || is_user_alive( id ) && is_user_alive( i ) || !is_user_alive( id ) && !is_user_alive( i ) ) { get_user_team( i, team, charsmax( team ) ); change__TeamInfo(i, color ); writeMessage( i, szData ); change__TeamInfo( i, team ); } }
return PLUGIN_HANDLED_MAIN; }
public change__TeamInfo( player, team[ ] ) { message_begin( MSG_ONE, get_user_msgid( "TeamInfo" ), _, player ); write_byte( player ); write_string( team ); message_end( ); }
stock is_valid( text[ ], maxcount ) {
static len, i, count; len = strlen( text ); count = 0;
EN:
In this forum, you must post and comment in English, not in Spanish. If you do not know English, go to the forum created exclusively for users who speak Spanish: https://amxmodx-es.com (you already know it) ...
Es:
En este foro, debes publicar y comentar en inglés, no en español. Si no sabes inglés, ve al foro creado exclusivamente para usuarios que hablan español: https://amxmodx-es.com (ya lo conoces)...
Then there's no point of submitting it when it's not different than any of the other hardcoded plugins uploaded here. It's not difficult at all if you're experienced enough.
Then there's no point of submitting it when it's not different than any of the other hardcoded plugins uploaded here. It's not difficult at all if you're experienced enough.
I have never seen those ranges, to see you have some similarities?