modo hs mensaje con color
#1
bueno este plugins tiene un bug . al activar modo hs . cuando el jugador hace retry el modo hs se desastiva . si pueden ayudar con el plugins a que se mantenga activado aun que el jugador salga del sv

Código PHP:
/* AMX Mod X Aim Practice.

I know there is a plugin that already allows only headshots.
I made it because i found it to be very buggy, so if you only
want the headshot mode, use this :)

Version History: -
    First release: 1.0
    Fixed print_chat from id, to all. Now everyone knows when its enabled

Usage: -
    aim_prac <on|off> or  <1|0>
    
Get the latest version at: -
    http://www.amxmodx.org/forums/viewtopic.php?p=31377#31377

 (c) 2003, James "rompom7" Romeril
 This file is provided as is (no warranties).
*/

#include <amxmodx>
#include <fun>

public aim_prac(id)
{
    if (
id && !((get_user_flags(id) & ADMIN_LEVEL_A)))
    {
        
client_print(idprint_console"[AMXX] You do not have access to this command")
        return 
PLUGIN_CONTINUE
    
}
    new 
arg[8]
    
read_argv(1arg7)

    if((
equali(arg"on"))||(equali(arg"1")))
    {
        
set_user_hitzones(,02)
        
client_print(idprint_console"[AMXX] ENABLED Headshot only mode")
        
client_print(0print_chat"[AMXX] ENABLED Headshot only mode")
    }
    else
    {
        
set_user_hitzones(00255)
        
client_print(idprint_console"[AMXX] DISABLED Headshot only mode")
        
client_print(0print_chat"[AMXX] DISABLED Headshot only mode")
    }
    return 
PLUGIN_HANDLED
}

public 
plugin_init()
{
    
register_plugin("Aim Practice","1.0","James Romeril")
    
register_concmd("aim_prac""aim_prac"ADMIN_LEVEL_A"aim_prac <on|off> or <1|0>")

Responder
#2
usa este

https://forums.alliedmods.net/showpost.p...ostcount=3
Responder
#3
cuando activo me sale este mensaje
ml_notfound ACTIVO MODO HS

COMO PUEDO SAKARLE EL ML_NOTFOUND Y CAMBIARSELO POR OTRO NOMBRE [HS]

Código PHP:
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>

#define MAX_PLAYERS 32

new bool:g_hs_mode
new display_hud
new bool:g_RestartAttempt[MAX_PLAYERS+1]
new 
g_fwid

public plugin_init() {
    
register_plugin("HeadShot Mod""1.1b""ConnorMcLeod")
    
register_dictionary("hs_only.txt")

    
register_event("TextMsg""eRestartAttempt""a""2=#Game_will_restart_in")
    
register_event("ResetHUD""eResetHUD""be")

    
register_concmd("amx_hs_mode""switchCmd"ADMIN_KICK"- <0|1> : Hs Only Mode = Disabled|Enabled")
    
register_clcmd("clcmd_fullupdate""fullupdateCmd")
    
    
display_hud register_cvar("amx_hs_display""1")
}

public 
fullupdateCmd() {
    return 
PLUGIN_HANDLED_MAIN
}

public 
eRestartAttempt() {
    new 
players[MAX_PLAYERS], num
    get_players
(playersnum"a")
    for (new 
inum; ++i)
        
g_RestartAttempt[players[i]] = true
}

public 
eResetHUD(id) {
    if (
g_RestartAttempt[id]) {
        
g_RestartAttempt[id] = false
        
return
    }
    
event_player_spawn(id)
}

event_player_spawn(id) {
    if( 
g_hs_mode && get_pcvar_num(display_hud) )
        
display_status(id)
}

public 
switchCmd(idlevelcid) {
    if(!
cmd_access(idlevelcid2))
        return 
PLUGIN_HANDLED

    
new arg[2]
    
read_argv(1arg1)

    new 
temp str_to_num(arg)
    
    switch(
temp) {
        case 
0: {
            if(!
g_hs_mode) {
                
client_print(idprint_console"Modo hs ya está desactivado")
            }
            else {
                
unregister_forward(FM_TraceLineg_fwid1)
                
g_hs_mode false
                client_print
(idprint_console"Hs Only Mod Disabled")
            }
        }
        case 
1: {
            if(
g_hs_mode) {
                
client_print(idprint_console"modo hs ya esta habilidato")
            }
            else {
                
g_fwid register_forward(FM_TraceLine"forward_traceline"1)
                
g_hs_mode true
                client_print
(idprint_console"Hs Only Mod Enabled")
                
display_status()
            }
        }
        default: {
            
client_print(idprint_console"amx_hs_mode <0|1> : Hs Only Mode = Disabled|Enabled")
        }
    }
    return 
PLUGIN_HANDLED
}

public 
forward_traceline(Float:v1[3], Float:v2[3], noMonsterspentToSkip)
{
    if(!
is_user_alive(pentToSkip))
        return 
FMRES_IGNORED

    
static entity2 entity2 get_tr(TR_pHit)
    if(!
is_user_alive(entity2))
        return 
FMRES_IGNORED

    
if(pentToSkip == entity2)
        return 
FMRES_IGNORED

    
if(get_tr(TR_iHitgroup) != 1) {
        
set_tr(TR_flFraction,1.0)
        return 
FMRES_SUPERCEDE
    
}
    return 
FMRES_IGNORED
}

display_status(id=0){
    switch( 
get_pcvar_num(display_hud) )
    {
        case 
1: {
            
set_hudmessage(2551000.050.6020.16.00.10.15, -1)
            
show_hudmessage(id"%L"id id LANG_PLAYER"MODO HS ACTIVO")
        }
        case 
2:client_print(idprint_chat"%L"id id LANG_PLAYER"MODO HS ACTIVO")
    }

Responder
#4
te sale ml_notfound porque no descargaste el archivo .txt que va en data/lang
Responder
#5
no sige igual el mismo mensaje porque ?
faltara algun archivo ?

ml_notfound modo hs activo

data/lang
hs_only.txt

[en]
HS_MODE_ON = [HS Only] Only head shots can hit players !!

[fr]
HS_MODE_ON = [HS Only] Seuls les tirs à la tête touchent !!
Responder
#6
porque editaste algo que no debias donde decia %L

Código PHP:
show_hudmessage(id"%L"id id LANG_PLAYER"MODO HS ACTIVO"
esta parte dejala como estaba

o reemplaza el %L por el mensaje que quieras

Código PHP:
show_hudmessage(id"asdasd"
Responder


Salto de foro:


Usuarios navegando en este tema: 1 invitado(s)