Jump to content

    Reducir peso a los mapas

    hangar
    Por hangar

    Hola a todos joda1 joda1

     

    Bueno resulta que yo siempre que mapeo, el mapa pesa muchisimo, y veo otros mapas con mas cosas y no pesan tanto.

    Por ejemplo, hice el spawn de un mapa deathrun, y pesa 1,5MB!!!! si recien en el spawn pesa eso, imaginense cuando se termine.

    Mapas que no tienen casi nada pesan 6mb (solo el BSP)

     

    Yo nulleo las texturas de afuera para reducir peso, pero hay alguna otra forma de restarle peso al mapa? gracias!!

     


    Hola gente!!

    hangar
    Por hangar

    Hola gente, todo bien???

     

    Soy nuevo en la página, ya la conocía desde hace años, pero nunca entre, recibí haace poco una invitación de Puntito para entrar, y bueno, acá estoy, viendo que onda :)

    Hace relativamente poco que Mapeo igual.

     

    Espero caerles bien!

     

    GAMEBANANA

     


    [Desafio] Recrea tu habitacion

    Carnacleos
    Por Carnacleos

    Buenas mappers!, en esta ocasion los invito a participar de un pequeño desafio en donde tendran que recrear su habitacion por medio del Valve Hammer Editor claro esta.

     

    No hay reglas, pueden usar todo lo que quieran y tampoco tiene porque ser jugable, me refiero a que no se preocupen por si tiene bajos fps, es decir que pueden darle los detalles que quieran, la finalidad de esto es que puedan mapear como unos campeones :D (pero seria conveniente que intenten subirlos).

     

    Tendran un mes de plazo, es decir que la fecha de entrega sera el 10 de Febrero.

     

    Una vez que terminen el mapa, me lo pueden enviar por MP, teniendo en cuenta tambien que deben agregar una o mas fotos de sus respectivas habitaciones, esto es necesario para poder calificar dicho mapa.

    Cuando esten entregados todos los mapas seran publicados y la eleccion de los 3 ganadores sera llevada a cabo por el staff, el cual tambien podra participar.

     

    Cualquier duda, opinion o sugerencia comentenla, saludos!.

     

     

    Participantes:

    Dario

    DanielMap

    [.] Puntito :D

    DartSerafim

    Zy0n

    jpg

     

    Agregados 10 dias mas de plazo.

    25AA88FB7.jpg


    Ntvg - viajando sin espada

    MulocK
    Por MulocK


    Soporte Para Gestion de Archivos...

    I'mBuggimen.
    Por I'mBuggimen.

    Hola Como estan; sera una introduccion breve puesto que no es para gastar tiempo/letras

     

    me estoy dando cuenta que aqui la gestio para subir archivos solo tiene validez en 'x' formatos.. entonces mi sugerencia es dar soporte en mas formatos tipo script como lo son .sma/.amxx etc...

     

    ya que no puedo subir Scripts si no es un .rar cosa que no deberia pasar.


    Holaaa!

    Facku
    Por Facku

    Holaaaas. Recibi una invitacion para ingresar en este foro y como el tema del mapping es una de las cosas que quiero aprender decidi registrarme ^^ ... Espero pueda lograr mi objetivo de hacer un mapa algun dia ':D

    Saludos!


    GhostMod 1.0

    Skylar
    Por Skylar

    Hola gente del foro ^^

     

    Nombre del mod: GhostMod.

    Versión del mod: 1.0.

    Autor: Skylar.

    Imágenes: No tengo.

     

    Descripción: Al comienzo de la ronda se elige un usuario al azar(random) y es convertido en el Ghost y ese usuario elegido tendrá que matar a los policías.

    El Ghost es un terrorista invisible, el título lo dice jaja.

     

    Los stocks "PrecacheSound" y "PlaySound" remplazan a "precache_sound" y "client_cmd".

    La función de esos stocks, es que precachea y reproduce el sonido sin importa que sea ".mp3" o ".wav".

     

    Quizás pronto actualize y le agregue algunas cosas más.

     

    Sonidos: http://www.mediafire.com/download/6x28rx15jmwp08n/SonidosGhostMod.rar

     

    Código.

     

     

    /* =========================================================================================== */
    
    #include <amxmodx>
    #include <cstrike>
    #include <engine>
    #include <fakemeta>
    #include <fun>
    #include <hamsandwich>
    
    new const RegisterPlugin[][] = { "GhostMod", "1.0", "Skylar" };
    
    new const gPrefix[] = "^4[ GHOSTMOD ]^1";
    
    #define BitTrue(%1,%2) ( %1 |= ( 1 << ( %2 & 31 ) ) ) 
    #define IsBit(%1,%2) ( %1 & ( 1 << ( %2 & 31 ) ) ) 
    #define BitFalse(%1,%2) ( %1 &= ~ ( 1 << ( %2 & 31 ) ) ) 
    
    /* =========================================================================================== */
    
    new gGhost[33];
    new gTimeCount, gCountHud;
    new gHudGhost, gHudWinTeam;
    new gUserConnected, gUserAlive;
    new gMaxPlayers;
    new gModName[32];
    
    enum (+=100) { TASK_COUNT = 2000, TASK_WELCOMEMSG };
    
    const gHealthHuman = 150;
    const gArmorHuman = 200;
    const Float:gSpeedHuman = 270.0;
    const Float:gGravHuman = 0.6;
    
    const gHealthGhost = 500;
    const Float:gSpeedGhost = 280.0;
    const Float:gGravGhost = 0.4;
    
    new const gSoundCount[][] = 
    { 
    0,
    "GhostMod/Conteo/one.wav",
    "GhostMod/Conteo/two.wav",
    "GhostMod/Conteo/three.wav",
    "GhostMod/Conteo/four.wav",
    "GhostMod/Conteo/five.wav",
    "GhostMod/Conteo/six.wav",
    "GhostMod/Conteo/seven.wav",
    "GhostMod/Conteo/eight.wav",
    "GhostMod/Conteo/nine.wav",
    "GhostMod/Conteo/ten.wav"
    };
    
    new const SoundWin[][] = { "sound/GhostMod/WinTeam/WinGhost.mp3", "sound/GhostMod/WinTeam/WinPolice.mp3" };
    new const SoundAmbient[] = "sound/GhostMod/WalkingDeadTheme.mp3";
    new const BlockWeapon[][] = { "weaponbox", "armoury_entity", "weapon_shield" };
    const IMPULSE_FLASHLIGHT = 100;
    
    /* =================================================================================
    
    ================================================================================= */
    
    public client_putinserver(id) BitTrue(gUserConnected, id);
    
    public client_disconnect(id)
    {
    BitFalse(gUserConnected, id);
    BitFalse(gUserAlive, id);
    }
    
    public plugin_precache()
    {
    set_lights("b");
    
    precache_sound(SoundAmbient);
    PrecacheSound(SoundWin[0]);
    PrecacheSound(SoundWin[1]);
    
    for(new i = 0; i < sizeof gSoundCount; i++)
    	engfunc(EngFunc_PrecacheSound, gSoundCount[i]);
    
    
    }
    
    public plugin_init()
    {
    register_plugin(RegisterPlugin[0], RegisterPlugin[1], RegisterPlugin[2]);
    
    register_event("HLTV", "event_RoundStart", "a", "1=0", "2=0" );
    register_logevent("event_RoundEnd", 2, "1=Round_End");
    register_event("SendAudio", "event_WinGhost", "a", "2&%!MRAD_terwin");
    register_event("SendAudio", "event_WinPolice", "a", "2&%!MRAD_ctwin");
    
    register_clcmd("drop", "ClcmdBlock");
    register_concmd("kill", "ClcmdBlock");
    register_clcmd("chooseteam", "ClcmdBlock");
    
    RegisterHam(Ham_Spawn, "player", "ham_PlayerSpawn");
    RegisterHam(Ham_Item_PreFrame, "player", "ham_Item_Preframe");
    for(new i = 0; i < sizeof BlockWeapon; ++i)
    	RegisterHam(Ham_Touch, BlockWeapon[i], "ham_TouchWeapon");
    RegisterHam(Ham_Spawn, "weapon_c4", "BlockC4", true);
    
    register_impulse(IMPULSE_FLASHLIGHT, "BloquearLinterna");
    
    register_message(get_user_msgid("StatusIcon"), "message_statusicon");
    
    register_forward(FM_GetGameDescription, "fw_GetGameDescription")
    
    formatex(gModName, sizeof gModName - 1, "GhostMod %s", RegisterPlugin[1]);
    
    gCountHud = CreateHudSyncObj();
    gHudGhost = CreateHudSyncObj();
    gHudWinTeam = CreateHudSyncObj();
    gMaxPlayers = get_maxplayers();
    
    set_task(1.0, "plugin_cfg");
    }
    
    public plugin_cfg()
    {
    set_cvar_num("mp_autoteambalance", 0);
    set_cvar_num("mp_freezetime", 0);
    set_cvar_num("mp_roundtime", 8);
    }
    
    public event_RoundStart()
    {
    new gPlayers[32], gNum, gPlayer;
    get_players(gPlayers, gNum);
    
    for(new i = 0; i < gNum; i++)
    {
    	gPlayer = gPlayers[i];
    	gGhost[gPlayer] = false;
    }
    
    remove_task(TASK_COUNT);
    gTimeCount = 10;
    set_task(1.0, "StartCount", TASK_COUNT , .flags="b");
    
    remove_task(TASK_WELCOMEMSG);
    set_task(2.0, "WelcomeMsg");
    }
    
    public event_RoundEnd()
    {
    client_cmd(0, "mp3 stop");
    
    for(new id = 1 ; id <= gMaxPlayers ; id++)
    {
    	if (!IsBit(gUserConnected, id)) continue;
    
    	set_user_rendering(id, kRenderFxNone, 0, 0, 0, kRenderTransAlpha, 255)
    }
    }
    
    public event_WinGhost()
    {
    static RandomR, RandomG, RandomB;
    RandomR = random_num(0, 255); RandomG = random_num(0, 255); RandomB = random_num(0, 255);
    
    set_hudmessage(RandomR, RandomG, RandomB, -1.0, 0.28, 2, 0.02, 1.0, 0.01, 0.1, 10);
    ShowSyncHudMsg(0, gHudWinTeam, "Ghost aniquilo a todos los humanos.^nGhost gano la partida.");
    
    PlaySound(SoundWin[0]);
    }
    
    public event_WinPolice()
    {
    static RandomR, RandomG, RandomB;
    RandomR = random_num(0, 255); RandomG = random_num(0, 255); RandomB = random_num(0, 255);
    
    set_hudmessage(RandomR, RandomG, RandomB, -1.0, 0.28, 2, 0.02, 1.0, 0.01, 0.1, 10);
    ShowSyncHudMsg(0, gHudWinTeam, "Ganaron los humanos.");
    
    PlaySound(SoundWin[1]);
    }
    
    public ClcmdBlock(id) return PLUGIN_HANDLED;
    
    public ham_PlayerSpawn(id)
    {
    if (IsBit(gUserConnected, id) && !IsBit(gUserAlive, id) && is_user_alive(id))
    	BitTrue(gUserAlive, id);
    
    if (IsBit(gUserAlive, id))
    {
    	set_task(0.4, "SetAttributes");
    	set_task(0.4, "RemoveWeapons");
    }
    }
    
    public ham_Item_Preframe(id)
    {
    if (!IsBit(gUserAlive, id)) return;
    
    set_user_maxspeed(id, (!gGhost[id]) ? gSpeedHuman : gSpeedGhost);
    set_user_gravity(id, (!gGhost[id]) ? gGravHuman : gGravGhost);
    }
    
    public ham_TouchWeapon(wpn, id)
    {
    if (!IsBit(gUserConnected, id))
    	return HAM_IGNORED;
    
    return HAM_SUPERCEDE;
    }
    
    public BlockC4(ent)
    {
    static const OBJETIVOS[][] =
    {
    	"func_bomb_target", "info_bomb_target", "info_vip_start", 
    	"func_vip_safetyzone", "func_escapezone", "hostage_entity",
    	"monster_scientist", "func_hostage_rescue", "info_hostage_rescue", 
    	"env_fog", "env_rain", "env_snow", "item_longjump", "func_vehicle", "weapon_c4"
    };
    
    if (!is_valid_ent(ent)) return;
    
    static classname[32], i;
    entity_get_string(ent, EV_SZ_classname, classname, charsmax(classname));
    
    for (i = 0; i < sizeof(OBJETIVOS); i++)
    {
    	if (equal(OBJETIVOS[i], classname))
    	{
    		remove_entity(ent);
    		return;
    	}
    }
    }
    
    public BloquearLinterna(id)
    {
    if (gGhost[id])
    	return PLUGIN_HANDLED;
    
    return PLUGIN_CONTINUE;
    }
    
    public message_statusicon(msg_id, msg_dest, id)
    {
    static szIcon[8];
    get_msg_arg_string(2, szIcon, charsmax(szIcon));
    
    if (equal(szIcon, "buyzone") && get_msg_arg_int(1))
    {
    	set_pdata_int(id, 235, get_pdata_int(id, 235) & ~(1<<0));
    	return PLUGIN_HANDLED;
    }
    
    return PLUGIN_CONTINUE;
    }
    
    public fw_GetGameDescription()
    {
    // Return the mod name so it can be easily identified
    forward_return(FMV_STRING, gModName)
    
    return FMRES_SUPERCEDE;
    }
    
    /* =================================================================================
    
    ================================================================================= */
    
    public StartCount()
    {   
    static RandomR, RandomG, RandomB;
    RandomR = random_num(10, 255); RandomG = random_num(0, 255); RandomB = random_num(10, 255);
    
    emit_sound(0, CHAN_VOICE, gSoundCount[gTimeCount], 1.0, ATTN_NORM, 0, PITCH_NORM);
    
    set_hudmessage(RandomR, RandomG, RandomB, -1.0, 0.28, 2, 0.02, 1.0, 0.01, 0.1, 10);
    ShowSyncHudMsg(0, gCountHud, "El modo sera lanzado en: %i.", gTimeCount);
    
    gTimeCount--;
    
    if (!gTimeCount)
    {
    	set_task(0.3, "StartGhostMod");
    	remove_task(TASK_COUNT);
    }
    }
    
    public StartGhostMod()
    {
    new gName[32];
    
    new gPlayers[32], gNum, gPlayer;
    get_players(gPlayers, gNum, "a");
    
    for(new i = 0; i < gNum; i++)
    {
    	gPlayer = gPlayers[i];
    	cs_set_user_team(gPlayer, CS_TEAM_CT);
    	SetAttributes(gPlayer);
    }
    
    new gUserGhost = ChooseGhost("a");
    get_user_name(gUserGhost, gName, charsmax(gName));
    
    static RandomR, RandomG, RandomB;
    RandomR = random_num(55, 255); RandomG = random_num(10, 255); RandomB = random_num(55, 255);
    
    SetGhost(gUserGhost);
    set_hudmessage(RandomR, RandomG, RandomB, -1.0, 0.28, 2, 0.02, 1.0, 0.01, 0.1, 10);
    ShowSyncHudMsg(0, gHudGhost, "El usuario %s se ha convertido en el ghost !", gName);
    
    client_cmd(0, "MP3Volume 4.0")
    client_cmd(0, "mp3 play ^"%s^"", SoundAmbient);
    }
    
    ChooseGhost(const Flags[]="", const Team[]="")
    {
    static gPlayers[32], gNum;
    get_players(gPlayers, gNum, Flags, Team);
    
    return (gNum > 0) ? gPlayers[random(gNum)] : 0;
    }
    
    SetGhost(id)
    {
    if (!is_user_alive(id)) return;
    
    gGhost[id] = true;
    
    cs_set_user_team(id, CS_TEAM_T);
    strip_user_weapons(id);
    give_item(id, "weapon_knife");
    
    cs_set_user_nvg(id, 1);
    SetAttributes(id);
    }
    
    public SetAttributes(id)
    {
    if (!IsBit(gUserAlive, id)) return;
    
    if (gGhost[id])
    {
    	set_user_health(id, gHealthGhost);
    	set_user_rendering(id, kRenderFxNone, 0, 0, 0, kRenderTransAlpha, 10);
    }
    else
    {
    	set_user_health(id, gHealthHuman);
    	set_user_armor(id, gArmorHuman);
    	give_item(id, "weapon_m4a1");
    	cs_set_user_bpammo(id, CSW_M4A1, 999);
    }
    }
    
    public RemoveWeapons(id)
    {
    if (!IsBit(gUserAlive, id)) return;
    
    strip_user_weapons(id);
    give_item(id, "weapon_knife");
    }
    
    public WelcomeMsg(id)
    {
    if (!IsBit(gUserConnected, id)) return;
    
    ClientPrint(id, "^3--^4 Modo Ghost %s ^3--", RegisterPlugin[1]);
    ClientPrint(id, "%s Creado por^4 Skylar^1.", gPrefix);
    }
    
    /* =================================================================================
    
    ================================================================================= */
    
    stock ClientPrint(const id, const input[], any:...)
    {
    new count = 1, players[32];
    static msg[191];
    vformat(msg, 190, input, 3);
    
    replace_all(msg, 190, "!g", "^4");
    replace_all(msg, 190, "!y", "^1");
    replace_all(msg, 190, "!t", "^3");
    
    if (id) players[0] = id; else get_players(players, count, "ch");
    {
    	for (new i = 0; i < count; i++)
    	{
    		if (is_user_connected(players[i]))
    		{
    			message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i]);
    			write_byte(players[i]);
    			write_string(msg);
    			message_end();
    		}
    	}
    }
    }
    
    stock PrecacheSound(gFile[])
    {
    if (equal(gFile[strlen(gFile) - 4], ".mp3"))
    	precache_generic(gFile);
    else
    	precache_sound(gFile);
    }
    
    stock PlaySound(const gFile[])
    {
    if (equal(gFile[strlen(gFile) - 4], ".mp3"))
    	client_cmd(0, "mp3 play ^"%s^"", gFile);
    else
    	client_cmd(0, "spk ^"%s^"" , gFile);
    }
    

     

     

     

    Espero que les guste :D


    Los Mejores Solos de Guitarra.

    I'mBuggimen.
    Por I'mBuggimen.

    Comenten los mejores solos/riffs de guitarras o sus respectivas canciones donde se encuentran

     

    - Queen - Bohemian Rhapsody [ Brian May ]

    - Deep Purple - HighWay Star [ Ritchie BlackMore ]

    - Pink Floyd - Confortably Numb [ David Glamour ]


    Rangos Por Horas

    I'mBuggimen.
    Por I'mBuggimen.

    Rangos Por Horas

     

    Explicación:

     

    Para el Rango 1: Necesitas 5 Horas;

    Para el Rango 2: Necesitas 10 Horas;

     

    Pd: Las Horas Se Ganan Jugando en el Servidor

     

    Changelog:

    /*
    Changelog:
    	- 1.0 - Lanzamiento Oficial
    	- 1.5 - Re estructurando partes del codigo 
    	- 1.7 - Agregando Privilegios a los Jugadores
    */
    

     

    Mejoras en la 1.7:

    - Habilidades Especiales ( desbloqueables por Rangos & Actiavar/Desactivar al gusto del jugador );

     

     

    CVARS:

    - rh_habilidades - 1/0 Activas/Desactivas - [ Habilidades Especiales ]

     

     

    Créditos:

     

    Jollero = Idea,

    Destro = Su ingenioso Advanced_vault;

     

    Necesitas:

     

    Advanced Vault LINK: https://amxmodx-es.com/Thread-API-Advanc...#pid104596

     

    #include < amxmodx >
    #include < adv_vault >
    
    #define HUD_ID (taskid-TASK_HOURS)
    #define TASK_HOURS 100
    
    new const g_iCredits[ ][ ] = { "Rangos Por Horas", "1.0b", "ImBuggimen" };
    
    /* ===================================================== 
    * <<<<<<<<<<<<    INICIA SECCION MODIFICABLE >>>>>>>>>>>>> 
    * ===================================================*/
    
    enum _:_STRUCT_RANGE { RNAME[ 90 ], HOURS_REQUIRED };
    enum _:_STRUCT_TIME { SEGUNDOS, MINUTOS, HORAS };
    enum { FIELD_TIMES, FIELD_RANGES, MAX_FIELDS };
    
    
    #pragma semicolon 1
    
    new const g_szRangos[ ][ _STRUCT_RANGE ] =
    {
       { "Miembro Nuevo", 0 },
       { "Miembro Reconocido", 3 },
       { "Miembro Sr.", 10 },
       { "Miembro Heroe", 15 },
       { "Veterano", 20 },
       { "", 999999 } // Fix Bug del Hud
    };
    
    
    new g_iRangos[ 33 ];
    new g_iTime[ 33 ][ _STRUCT_TIME ];
    new g_iPlayerName[ 33 ][ 32 char ];
    new g_iFields[ MAX_FIELDS ];
    
    new g_iHud;
    new g_iGuardado;
    
    public plugin_init( ) 
    {
       register_plugin( g_iCredits[ 0 ], g_iCredits[ 1 ], g_iCredits[ 2 ] );
    
       g_iHud = CreateHudSyncObj( );
    
       g_iGuardado = adv_vault_open( "GuardadoRanges", false );
    
       g_iFields[ FIELD_RANGES ] = adv_vault_register_field( g_iGuardado, "Ranges" );
       g_iFields[ FIELD_TIMES ]  = adv_vault_register_field( g_iGuardado, "Times", DATATYPE_ARRAY, 3 );
    
       adv_vault_init( g_iGuardado );
    }
    
    public client_putinserver( index )
    {
       get_user_name( index, g_iPlayerName[ index ], charsmax( g_iPlayerName[ ] ) );
       arrayset( g_iTime[ index ], 0, sizeof( g_iTime[ ] ) );
       g_iRangos[ index ] = 0;
       set_task( 1.0, "ShowHRangos", index+TASK_HOURS, _, _, .flags = "b" );
       iCargar( index );
    }
    
    public client_infochanged( index )
    {
       if( !is_user_connected( index ) ) return;
    
       static NewName[ 32 ];
       get_user_info( index, "name", NewName, 31 );
    
       if( !equal( NewName, g_iPlayerName[ index ] ) )
       {
           copy( g_iPlayerName[ index ], 31, NewName );
           iCargar( index );
       }
    }
    
    public client_disconnect( index ) 
    {
       remove_task( index+TASK_HOURS );
       iGuardar( index );
    }
    
    public ShowHRangos( taskid )
    {
       static index; index = HUD_ID;
    
       if( is_user_connected( index ) )
       {
           if( g_iTime[ index ][ SEGUNDOS ] > 59 )
           {
               g_iTime[ index ][ SEGUNDOS ] = 0;
               g_iTime[ index ][ MINUTOS ]++;
           }
           else g_iTime[ index ][ SEGUNDOS ]++;
    
           if( g_iTime[ index ][ MINUTOS ] > 59 )
           {
               g_iTime[ index ][ MINUTOS ] = 0;
               g_iTime[ index ][ HORAS ]++;
               Range_check( index );
           }
       }
       set_hudmessage( 200, 100,  0, 0.1, 0.03, 1 );
       ShowSyncHudMsg( index, g_iHud, "[ Rango: %s ]^n^n[ Tiempo Jugado ]^n[ Segundos: %d ]^n[ Minutos: %d ]^n[ Horas: %d ]",
       g_szRangos[ g_iRangos[ index ] ][ RNAME ], g_iTime[ index ][ SEGUNDOS ], g_iTime[ index ][ MINUTOS ], g_iTime[ index ][ HORAS ] );
    }
    
    public Range_check( index )
    {
       new Range_Up = false;
    
       if( g_iTime[ index ][ HORAS ] >= g_szRangos[ g_iRangos[ index ] ][ HOURS_REQUIRED ] )
       {
           g_iRangos[ index ]++;
           Range_Up = true;
       }
       if( Range_Up ) iChat( index, "^4Haz Sido Promovido a %s", g_szRangos[ g_iRangos[ index ] ][ RNAME ] ), Range_Up = false;
    }
    
    public iGuardar( index )
    {
       adv_vault_set_start( g_iGuardado );
    
       adv_vault_set_field( g_iGuardado, g_iFields[ FIELD_TIMES ], g_iTime[ index ] );
       adv_vault_set_field( g_iGuardado, g_iFields[ FIELD_RANGES ], g_iRangos[ index ] );
    
       adv_vault_set_end( g_iGuardado, 0, g_iPlayerName[ index ] );
    }
    
    public iCargar( index )
    {
       if( !adv_vault_get_prepare( g_iGuardado, _, g_iPlayerName[ index ] ) ) return;
    
       g_iRangos[ index ] = adv_vault_get_field( g_iGuardado, g_iFields[ FIELD_RANGES ] );
       adv_vault_get_field( g_iGuardado, g_iFields[ FIELD_TIMES ], g_iTime[ index ], sizeof ( g_iTime[ ] ) );    
    }
    
    stock iChat( index, const input[ ], any:... )
    {
       static iSayText, sziMsg[ 191 ];
    
       if ( !iSayText )
       iSayText = get_user_msgid( "SayText" );
    
       replace_all( sziMsg, 190, "!g", "^4" );
       replace_all( sziMsg, 190, "!y", "^1" );
       replace_all( sziMsg, 190, "!team", "^3" );
    
       vformat( sziMsg, 190, input, 3 );
       message_begin( index ? MSG_ONE_UNRELIABLE : MSG_BROADCAST, iSayText, .player = index );
       write_byte( index ? index : 33 );
       write_string( sziMsg );
       message_end( );
    
    }

     

    Version 1.7:

     

    /*
    Changelog:
    	- 1.0 - Lanzamiento Oficial
    	- 1.5 - Re estructurando partes del codigo 
    	- 1.7 - Agregando Privilegios a los Jugadores
    */
    
    new const g_szCustom[ ] = { "Rangos Por Horas", "1.7b", "I'mBuggimen." };
    
    #include < amxmodx.inc >
    #include < amxmisc.inc >
    #include < fun.inc >
    #include < hamsandwich.inc >
    #include < fakemeta.inc >
    #include < adv_vault.inc >
    
    
    // =========================[~~]===========================
    
    #define TASK_HOURS 1212
    #define HUD_ID ( taskid - TASK_HOURS )
    
    #define SetPlayerBit(%0,%1)	( %0 |= ( 1 << ( %1 & 31 ) ) )
    #define GetPlayerBit(%0,%1)	( %0 & ( 1 << ( %1 & 31 ) ) )
    #define ClearPlayerBit(%0,%1)	( %0 &= ~( 1 << ( %1 & 31 ) ) )
    
    #define ClearString(%0)		( %0[ 0 ] = EOS )
    #define GET_SIZE(%0)		( sizeof( %0 ) - 1 )
    
    // =========================[~~]===========================
    
    enum
    {
    LOAD = 0,
    SAVE
    };
    
    enum
    {
    FIELD_TIMES,
    FIELD_RANGES,
    
    MAX_FIELDS
    };
    
    enum _: TIME_STRUCTURE
    {
    SECS = 0,
    MINS,
    HOURS
    };
    
    enum _: RANGE_STRUCTURE
    {
    RANGE_NAME[ 32 ],
    RANGE_REQUIRED
    };
    
    enum _: HABS_STRUCTURE 
    { 
    Updates_Name[ 32 ],
    Updates_Desc[ 150 ],
    Updates_Required
    } ;
    
    // =========================[~~]===========================
    
    new const g_szRangos[ 6 ][ RANGE_STRUCTURE ] =
    {
    { "Miembro Nuevo", 0 },
    { "Miembro Reconocido", 3 },
    { "Miembro Sr.", 10 },
    { "Miembro Heroe", 15 },
    { "Veterano", 20 },
    { "Miembro Destacado", 25 }
    };
    
    new const g_szMejoras[ ][ HABS_STRUCTURE ] = 
    {
    { "Bullet's Damage", "Esta Habilidad Es Muy Util^nTe Permite Ver El Daño INFLINGIDO", 1 },
    { "BunnyHop", "Esta Habilidad te va a permitir Saltar Sucesivamente Como Conejo^nTendras mas control del mapa", 2 },
    { "Probabilidad de Daño Critico!", "Dicha Habilidad Hara que Aumente un probabilidad de Daño critico^nEs decir si pegas 50 normal con critico pegas 100", 3 }
    };
    
    
    // =========================[~~]===========================
    
    new g_iRangos[ 33 ];
    new g_iTime[ 33 ][ TIME_STRUCTURE ];
    new g_szPN[ 33 ][ 32 ];
    new g_iFields[ MAX_FIELDS ];
    
    new sycn;
    
    new g_iHud;
    new g_iGuardado;
    
    new g_bConnected;
    new g_bAlive;
    
    new KEYUPDT =  ( 1 << 0 )|( 1 << 9 )  ;
    
    new g_szTxt[ 500 ];
    
    new g_iIdMejoras[ 32 + 1 ] ;
    new g_iMejoras[ 32 + 1 ][ sizeof( g_szMejoras[ ] ) ];
    
    new g_Mp;
    
    const XO_PLAYER =	 5
    const m_iTeam =		114
    
    new g_iTeam[ 33 ];
    
    new pcvar_allowhabs;
    
    public plugin_init( ) 
    {
    register_plugin( g_szCustom[ 0 ], g_szCustom[ 1 ], g_szCustom[ 2 ] );
    
    RegisterHam( Ham_Spawn, "player", "fHam_Spawn_Post", 1 )
    RegisterHam( Ham_Player_Jump, "player", "fHam_Jump_Pre", 0 ) ;
    RegisterHam( Ham_TakeDamage, "player", "fHam_TakeDamage_Pre", 0 );
    
    register_menu( "Menu Habilidades" , KEYUPDT , "mh_mejoras_inf" ) ;
    
    register_clcmd( "say /habilidades", "func_habilities" );
    
    g_iHud = CreateHudSyncObj( );
    
    g_Mp = get_maxplayers( );
    
    pcvar_allowhabs = create_cvar( "rh_habilidades", "1", _, "< 1/0 Activas/Desactivas - [ Habilidades Especiales ] >"  );
    
    Adv_Initialize( );
    
    sycn = CreateHudSyncObj( );
    }
    
    public Adv_Initialize( )
    {
    g_iGuardado = adv_vault_open( "GuardadoRangos", false );
    
    g_iFields[ FIELD_RANGES ] = adv_vault_register_field( g_iGuardado, "Ranges" );
    g_iFields[ FIELD_TIMES ]  = adv_vault_register_field( g_iGuardado, "Times", DATATYPE_ARRAY, 3 );
    
    adv_vault_init( g_iGuardado );
    }
    
    public fHam_Spawn_Post( const index )
    {
    if( GetPlayerBit( g_bConnected, index ) && !( GetPlayerBit( g_bAlive, index ) ) && is_user_alive( index	) )
    	SetPlayerBit( g_bAlive, index );
    
    if( GetPlayerBit( g_bAlive, index ) )
    {
    	g_iTeam[ index ] = get_pdata_int( index, m_iTeam, XO_PLAYER );
    }
    }
    
    public fHam_Killed_Post( const iVictim, const iKiller, const bool: bShouldgib )
    {
    if( iVictim == iKiller || !iKiller || g_iTeam[ iKiller ] == g_iTeam[ iVictim ] )
    	return HAM_IGNORED;
    
    ClearPlayerBit( g_bAlive, iVictim );
    
    return HAM_IGNORED;
    }
    
    public fHam_Jump_Pre( const index )
    {
    
    if( !get_pcvar_num( pcvar_allowhabs ) )
    	return HAM_IGNORED;
    
    if ( GetPlayerBit( g_bAlive, index ) && g_iMejoras[ index ][ 1 ] )
    {
    	pev( index, pev_fuser2, 0.0 ) ;
    
    	static flags ; flags = pev( index, pev_flags );
    
    	if ( ( flags & FL_WATERJUMP ) || !( flags & FL_ONGROUND ) || pev( index , pev_waterlevel ) >= 2 )
    	return HAM_IGNORED ;
    
    	static Float: vec[ 3 ] ; pev( index, pev_velocity, vec ) ;
    
    	vec[ 2 ] += 250.0 ;
    
    	set_pev( index , pev_velocity, vec ) ;
    
    }
    return HAM_HANDLED;
    }
    
    public fHam_TakeDamage_Pre( const victim, const Inflictor, const attacker, const Float:damage, const damage_type )
    {
    if ( victim == attacker || !( 1 <= attacker <= g_Mp && GetPlayerBit( g_bConnected , attacker ) ) )
    	return HAM_IGNORED ;
    
    if ( !( 1 <= victim <= g_Mp ) || g_iTeam[ attacker ] == g_iTeam[ victim ] )
    	return HAM_IGNORED ; 
    
    if( !get_pcvar_num( pcvar_allowhabs )  )
    	return HAM_IGNORED;
    
    if ( g_iMejoras[ attacker ][ 2 ] )
    {
    	if( random_num( 0, 100 ) < random_num( 0, 100 ) < random_num( 0, 100 ) )
    	{
    		SetHamParamFloat( 4, damage * 2 );
    		set_hudmessage( 0, 255, 0, -1.0, -1.0, 0, 6.0, 1.1, 3.0, 3.0, 3 );
    		show_hudmessage( attacker, "Golpe Critico!!!!" ) ;
    	}
    }
    
    if( g_iMejoras[ attacker ][ 0 ] )
    {		
    	set_hudmessage( 255, 0, 0, 0.45, 0.50, 2, 0.1, 4.0, 0.1, 0.1, -1 );
    	ShowSyncHudMsg( attacker, sycn, "Daño Inflingido: %i^n", floatround( damage ) );		
    }
    
    return HAM_HANDLED;
    }
    
    public func_habilities( const index )
    {
    if( !get_pcvar_num( pcvar_allowhabs ) )
    	return PLUGIN_CONTINUE;
    
    ShowHabs( index );
    
    return PLUGIN_HANDLED;
    }
    
    public ShowHabs( const index )
    {
    ClearString( g_szTxt );
    static menu , r ; 
    
    formatex( g_szTxt, GET_SIZE( g_szTxt ), "Lista de \yHabilidades" );
    
    menu = menu_create( g_szTxt , "mh_mejoras" ) ;
    
    for ( r = 0 ; r < sizeof( g_szMejoras ) ; ++ r )
    	menu_additem( menu, g_szMejoras[ r ][ Updates_Name ] ) ;
    
    menu_setprop( menu, MPROP_NUMBER_COLOR, "\y" );
    
    menu_setprop( menu, MPROP_NEXTNAME, "Siguiente" );
    menu_setprop( menu, MPROP_BACKNAME, "Atras" );
    
    menu_setprop( menu, MPROP_EXITNAME, "Salir" );
    
    menu_display( index, menu ) ;
    
    }
    
    public mh_mejoras( const index, const menu , const item )
    {
    if ( item == MENU_EXIT || get_pcvar_num( pcvar_allowhabs ) < 1 ) { menu_destroy( menu ) ; return PLUGIN_HANDLED; }
    
    g_iIdMejoras[ index ] = item ;
    
    mejoras_inf( index , item ) ;
    
    menu_destroy( menu ) ;
    return PLUGIN_HANDLED;
    }
    
    public mejoras_inf( const index , const item )
    {
    ClearString( g_szTxt );
    static len ; len = 0 ;
    
    len += formatex( g_szTxt[ len ] , GET_SIZE( g_szTxt ) - len, "\y%s \dHabilidad:^n\y%s^n^n", 
    g_iMejoras[ index ][ item ] ? "Habilitar \wo \rDesahabilitar" : "Viendo",
    g_szMejoras[ item ][ Updates_Name ] ) ;
    
    len += formatex( g_szTxt[ len ] , GET_SIZE( g_szTxt ) - len, "\yDESCRIPCION:^n\d %s^n^n", g_szMejoras[ item	][ Updates_Desc ] );
    
    if( g_iRangos[ index ] < g_szMejoras[ item ][ Updates_Required ] )
    {
    	len += formatex( g_szTxt[ len ] , GET_SIZE( g_szTxt ) - len, "\yNECESARIO:^n" ) ;
    
    	len += formatex( g_szTxt[ len ] , GET_SIZE( g_szTxt ) - len, "\y-\d Rango Requerido: \w%s ^n^n", g_szRangos[ g_szMejoras[ item ][ Updates_Required ] ][ RANGE_NAME ] ) ;
    }
    else
    {
    	len += formatex( g_szTxt[ len ] , GET_SIZE( g_szTxt ) - len, "\y[ \w1 \y]. \w%s \yHabilidad^n^n" , 
    	g_iMejoras[ index ][ item ] ? "Deshabilitar" : "Habilitar" );
    }
    
    
    len += formatex( g_szTxt[ len ] , GET_SIZE( g_szTxt ) - len, "\y[ \w0 \y]. \wAtras" ) ;
    
    show_menu( index, KEYUPDT, g_szTxt, -1 , "Menu Habilidades" );
    } 
    
    public mh_mejoras_inf( index , key )
    {
    switch( key )
    {
    	case 0 :
    	{
    		g_iMejoras[ index ][ g_iIdMejoras[ index ] ] = 1 - g_iMejoras[ index ][ g_iIdMejoras[ index ] ] ;
    		mejoras_inf( index, g_iIdMejoras[ index ] ) ;
    
    	}
    	case 9 : 
    	{
    		func_habilities( index ) ;
    	}
    
    }
    return PLUGIN_HANDLED ;
    }
    
    public client_putinserver( index )
    {
    SetPlayerBit( g_bConnected, index );
    
    get_user_name( index, g_szPN[ index ], charsmax( g_szPN[ ] ) );
    
    arrayset( g_iTime[ index ], 0, sizeof( g_iTime[ ] ) );
    
    g_iRangos[ index ] = 0;
    
    set_task( 1.0, "ShowHRangos", index+TASK_HOURS, _, _, .flags = "b" );
    
    func_management( index, LOAD );
    }
    
    public client_infochanged( index )
    {
    if( !is_user_connected( index ) ) return;
    
    static NewName[ 32 ];
    get_user_info( index, "name", NewName, 31 );
    
    if( !equal( NewName, g_szPN[ index ] ) )
    {
    	copy( g_szPN[ index ], 31, NewName );
    	func_management( index, SAVE );
    }
    }
    
    public client_disconnect( index ) 
    {
    remove_task( index + TASK_HOURS );
    
    ClearPlayerBit( g_bConnected, index ); 
    func_management( index, SAVE );
    }
    
    public ShowHRangos( taskid )
    {
    static index; index = HUD_ID;
    
    if( GetPlayerBit( g_bConnected, index ) )
    {
    	if( g_iTime[ index ][ SECS ] >= 59 )
    	{
    		g_iTime[ index ][ SECS ] = 0;
    		g_iTime[ index ][ MINS ]++;
    	}
    	else 
    		g_iTime[ index ][ SECS ]++;
    
    	if( g_iTime[ index ][ MINS ] >= 59 )
    	{
    		g_iTime[ index ][ MINS ] = 0;
    		g_iTime[ index ][ HOURS ]++;
    		Range_check( index );
    	}
    }
    set_hudmessage( 200, 100,  0, 0.1, 0.03, 1 );
    ShowSyncHudMsg( index, g_iHud, "Rango: [ %s ]^n^n[ Tiempo Jugado ]^n[ Segundos: %d ]^n[ Minutos: %d ]^n[ Horas: %d ]",
    g_szRangos[ g_iRangos[ index ] ][ RANGE_NAME ], g_iTime[ index ][ SECS ], g_iTime[ index ][ MINS ], g_iTime[ index ][ HOURS ] );
    }
    
    public Range_check( index )
    {
    static Range_Up, iLimit; Range_Up = false;
    
    iLimit = ( GET_SIZE( g_szRangos ) );
    
    if( g_iTime[ index ][ HOURS ] >= g_szRangos[ g_iRangos[ index ] ][ RANGE_REQUIRED ] && g_iRangos[ index ] < iLimit )
    {
    	g_iRangos[ index ] += clamp( 1, 0, iLimit ) ;
    	Range_Up = true;
    }
    if( Range_Up )
    {	
    	CC( 0, "^4%s a sido promovido a ^1%s", g_szPN[ index ], g_szRangos[ g_iRangos[ index ] ][ RANGE_NAME ] );
    	func_management( index, 0 );
    	Range_Up = false;
    }
    }
    
    public func_management( index, iWhat )
    {
    switch( iWhat )
    {
    	case LOAD:
    	{
    		if( !adv_vault_get_prepare( g_iGuardado, _, g_szPN[ index ] ) ) 
    			return;
    
    		g_iRangos[ index ] = adv_vault_get_field( g_iGuardado, g_iFields[ FIELD_RANGES ] );
    		adv_vault_get_field( g_iGuardado, g_iFields[ FIELD_TIMES ], g_iTime[ index ], sizeof ( g_iTime[ ] ) ); 
    	}
    	case SAVE:
    	{	
    		adv_vault_set_start( g_iGuardado );
    
    		adv_vault_set_field( g_iGuardado, g_iFields[ FIELD_TIMES ], g_iTime[ index ] );
    		adv_vault_set_field( g_iGuardado, g_iFields[ FIELD_RANGES ], g_iRangos[ index ] );
    
    		adv_vault_set_end( g_iGuardado, 0, g_szPN[ index ] );			
    	}
    }
    }
    
    stock CC( index, const input[ ], any:... )
    {
    static iSayText, sziMsg[ 191 ];
    
    if ( !iSayText )
    iSayText = get_user_msgid( "SayText" );
    
    replace_all( sziMsg, 190, "!g", "^4" );
    replace_all( sziMsg, 190, "!y", "^1" );
    replace_all( sziMsg, 190, "!team", "^3" );
    
    vformat( sziMsg, 190, input, 3 );
    message_begin( index ? MSG_ONE_UNRELIABLE : MSG_BROADCAST, iSayText, .player = index );
    write_byte( index ? index : 33 );
    write_string( sziMsg );
    message_end( );
    
    } 
    

     

    Criticas Constructivas y/o Sugerencias.


    Cuando te caes en una carrera y tu moto quiere seguir

    MulocK
    Por MulocK

Portal by DevFuse · Based on IP.Board Portal by IPS
×
×
  • Crear nuevo...

Información importante

Al utilizar nuestra web, aceptas nuestras Política de privacidad estás de acuerdo con las condiciones establecidas.