hud de quien te especta
#1
hud bastante bueno de quienes te espectan, normalmente veo este plugin en servers de deathrun xD es bastante útil e.e

Código PHP:
/*    Formatright © 2010, ConnorMcLeod

    This plugin is free software;
    you can redistribute it and/or modify it under the terms of the
    GNU General Public License as published by the Free Software Foundation.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this plugin; if not, write to the
    Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.
*/

#include <amxmodx>
#include <engine>

#define VERSION "0.0.1"
#define PLUGIN "Spectator Hud Informations"
#define AUTHOR "OF_CSBD" //no pongas tu nombre ya que tu no lo isiste

#define MAX_PLAYERS        32
#define FIRST_PERSON_VIEW 4

new const g_iWeaponIdToAmmoId[] = {
        
090212514641310764446101103541021184207}
        
new 
g_iHealth[MAX_PLAYERS+1]
new 
g_iArmor[MAX_PLAYERS+1]
new 
g_iMoney[MAX_PLAYERS+1]
new 
g_iCurWeapon[MAX_PLAYERS+1]
new 
g_iAmmo[MAX_PLAYERS+1]
new 
g_iBpAmmo[MAX_PLAYERS+1][15]

new 
g_dhud_color

public plugin_init()
{
    
register_plugin(PLUGINVERSION"ConnorMcLeod")

    
register_cvar("amx_spec_hud_color""250 250 250")

    
register_event("Money""Event_Money""b")
    
register_event("CurWeapon""Event_CurWeapon""b""1=1")
    
register_event("Health""Event_Health""b")
    
register_event("Battery""Event_Battery""b")
    
register_event("AmmoX""Event_AmmoX""b""1<15")

    new 
szColor[12], szRed[4], szGreen[4], szBlue[4], rgb
    get_cvar_string
("amx_spec_hud_color"szColorcharsmax(szColor))
    
parse(szColorszRedcharsmax(szRed), szGreencharsmax(szGreen), szBluecharsmax(szBlue))
    
clampstr_to_num(szRed), 0255)
    
clampstr_to_num(szGreen), 0255)
    
clampstr_to_num(szBlue), 0255)
    
g_dhud_color + ( << ) + ( << 16 )

    new 
iEnt create_entity("info_target")
    if( 
iEnt )
    {
        
entity_set_float(iEntEV_FL_nextthinkget_gametime() + 0.1)
        
entity_set_string(iEntEV_SZ_classname"_hud_spec")
        
register_think("_hud_spec""UpdateSpecHud")
    }
    else
    {
        
set_task(0.1"UpdateSpecHud", .flags="b")
    }
}

public 
UpdateSpecHudiEnt )
{
    if( 
iEnt )
    {
        
entity_set_float(iEntEV_FL_nextthinkget_gametime() + 0.1)
    }
    static 
iAlivePlayers[32], iDeadPlayers[32], iAliveCountiDeadCountiAlivePlayeriDeadPlayeri
    
static iAmmo
    
static bool:bRetrievedValuesszMessage1[128], szMessage2[128], iLen1iLen2
    get_players
(iAlivePlayersiAliveCount"a")
    if( !
iAliveCount )
    {
        return
    }
    
get_players(iDeadPlayersiDeadCount"bch")
    if( !
iDeadCount )
    {
        return
    }

    for(--
iAliveCountiAliveCount>=0iAliveCount--)
    {
        
bRetrievedValues false
        iAlivePlayer 
iAlivePlayers[iAliveCount]
        for(
i=0i<iDeadCounti++)
        {
            
iDeadPlayer iDeadPlayers[i]
            if( 
entity_get_int(iDeadPlayerEV_INT_iuser2) == iAlivePlayer && entity_get_int(iDeadPlayerEV_INT_iuser1) == FIRST_PERSON_VIEW )
            {
                if( !
bRetrievedValues )
                {
                    
iLen1 31formatex(szMessage1charsmax(szMessage1), "%3d HP^t^t^t%3d AP"g_iHealth[iAlivePlayer], g_iArmor[iAlivePlayer])
                    
iAmmo g_iAmmo[iAlivePlayer]
                    if( 
iAmmo != -)
                    {
                        
iLen2 31 formatex(
                                        
szMessage2charsmax(szMessage2), 
                                        
"$ %5d^n%3d|%3d"
                                        
g_iMoney[iAlivePlayer], iAmmog_iBpAmmo[iAlivePlayer][  g_iWeaponIdToAmmoIdg_iCurWeapon[iAlivePlayer] ]  ]
                                        )
                    }
                    else
                    {
                        
iLen2 31 formatex(szMessage2charsmax(szMessage2), "$ %5d^n"g_iMoney[iAlivePlayer])
                    }
                    
bRetrievedValues true
                
}

                
__show__dhudmessage(iDeadPlayerszMessage1iLen1_:0.01_:0.98)
                
__show__dhudmessage(iDeadPlayerszMessage2iLen2_:0.92_:0.93)

                
iDeadPlayers[i--] = iDeadPlayers[--iDeadCount]
                if( !
iDeadCount )
                {
                    return
                }
            }
        }
    }
}

public 
Event_Moneyid )
{
    
g_iMoney[id] = read_data(1)
}

public 
Event_CurWeapon(id)
{
    
g_iCurWeapon[id] = read_data(2)
    
g_iAmmo[id] = read_data(3)
}

public 
Event_AmmoX(id)
{
    
g_iBpAmmo[id][read_data(1)] = read_data(2)
}

public 
Event_Health(id)
{
    
g_iHealth[id] = read_data(1)
}

public 
Event_Battery(id)
{
    
g_iArmor[id] = read_data(1)
}

// code extracted from Director Hud Message include file
// http://forums.alliedmods.net/showthread.php?t=149210
__show__dhudmessage(id, const szMessage[], iLenxy)
{
    
message_beginMSG_ONE_UNRELIABLE SVC_DIRECTOR, .player=id )
    {
        
write_byteiLen )
        
write_byteDRC_CMD_MESSAGE )
        
write_byte)
        
write_longg_dhud_color )
        
write_long)
        
write_long)
        
write_long0x38D1B717 )
        
write_long0x38D1B717 )
        
write_long0x3DF5C28F )
        
write_long)
        
write_stringszMessage )
    }
    
message_end()

Responder
#2
Código PHP:
#define AUTHOR "OF_CSBD" //no pongas tu nombre ya que tu no lo isiste 






Código PHP:
register_plugin(PLUGINVERSION"ConnorMcLeod"


Genius
(10/10/2014, 06:38 PM)RauliTop escribió:
(10/10/2014, 04:40 PM)ivan escribió: no sabía que se podia poner los iconos gestuales cuando das reputacion negativa/positiva.
ui, peligro...
pronto habrán reputaciones de ivan:
hace muy muy muii DafuqYao mingGenius buenos Thats what she saidtutoriales Proud me encataan Whatever
Responder
#3
para que postear algo que ya existe?
[Imagen: bvpq9q-6.png]

NO DOY AYUDA VIA MENSAJE PRIVADO

* Si requieres algún servicio de pago puedes contactarme vía MP o en mi facebook
Responder
#4
Código PHP:
#define AUTHOR "OF_CSBD" //no pongas tu nombre ya que tu no lo isiste 
Código PHP:
register_plugin(PLUGINVERSION"ConnorMcLeod"
lol
Supongo que tu whoo! Pusiste:
Código PHP:
//no pongas tu nombre ya que tu no lo isiste 
Responder
#5
no encontraba el autor asi que le puse una tonteria, y pos postee aqui ya que muchos usuarios piden y no creen que deba estar en aportes?y lo de

Código PHP:
#define AUTHOR "OF_CSBD" //no pongas tu nombre ya que tu no lo isiste 

lo copie de csblackdevil pacman ya que no tenia nombre y fue de hay que lo saque pues le pude of csbd Lengua es la abreviación de csblackdevil. al no saber de quien era no era logico que le pusiera eso de donde lo e sacado?
Responder
#6
Código PHP:
/*    Formatright  2010, ConnorMcLeod

    This plugin is free software;
    you can redistribute it and/or modify it under the terms of the
    GNU General Public License as published by the Free Software Foundation.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this plugin; if not, write to the
    Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.
*/ 


Capas se te paso o no lo leíste. Whatever
Aunque este a simple vista. ^^
Responder


Salto de foro:


Usuarios navegando en este tema: 1 invitado(s)