Modificare din hud in dhudmessage

Modificari necesare ale pluginurilor

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Post Reply
User avatar
CsN^ ;x
Membru eXtream
Membru eXtream
Posts: 3560
Joined: 02 Apr 2012, 16:58
Detinator Steam: Nu
CS Status: Retras din domeniul Counter-Strike
Reputatie: Fost moderator
Location: Bucuresti
Has thanked: 797 times
Been thanked: 607 times

15 Aug 2014, 12:00

Deci vreau si eu in acest cod sa fi la aceias pozitie,sa aibe aceias culoare,sa faca acelas lucru dar vreau sa pun mesaju in dhudmessage si nu imi iese,am pus si #include <dhudmessage> in plugin si am modificat

Code: Select all

		set_hudmessage(r, g, b, -1.0, 0.88, 0, 0.0, FREQ, 0.01, 0.0)
		show_dhudmessage(id, "%3.2f Km/h", speed, speedh)
dar imi da errori.Codu e mai jos in hud.

Code: Select all

		set_hudmessage(r, g, b, -1.0, 0.88, 0, 0.0, FREQ, 0.01, 0.0)
		ShowSyncHudMsg(i, SyncHud, "%3.2f Km/h", speed, speedh)
Addons HNS level,gravity,xp DOWNLOAD ( e țeapă)
https://5filme.com/ - un simplu site de filme pentru timpul liber
RoyalServer
User avatar
CryWolf
Administrator
Administrator
Posts: 6505
Joined: 07 Aug 2008, 16:33
Detinator Steam: Da
Reputatie: Administrator
Fost Scripter
Manager CS2.eXtream.Ro
Fost Detinator ZM.eXtream.Ro
Fost manager CS.eXtream.Ro
Fost manager CSGO.eXtream.Ro
Fost manager global
Location: Botosani
Discord: crywolf1989
Has thanked: 202 times
Been thanked: 850 times
Contact:

15 Aug 2014, 12:04

Dhudul are cam acelas chestii ca hudul doar ca ultimul parametru (canal) nu are deci poti folosi aceleas setari doar sa scoti ultimul parametru de la hud la dhud!

De asemeni

Code: Select all

 set_hudmessage(r, g, b, -1.0, 0.88, 0, 0.0, FREQ, 0.01, 0.0)
      show_dhudmessage(id, "%3.2f Km/h", speed, speedh)
va fi

Code: Select all

set_dhudmessage ( r, g, b, -1.0, 0.88, 0, 0.0, FREQ, 0.01, 0.0 );
    show_dhudmessage ( id, "%3.2f Km/h", speed, speedh );

set_dhudmessage
NU IMI MAI DA-TI PM CU CERERE AJUTOR/SAMD, FOLOSITI FORUMUL, CITESC MAJORITATEA TOPICURILOR.
www.dark-arena.com , SERVERE CS / CS2 / L4D AU REVENIT ONLINE.
www.diasporaiptv.ro - SERVICII PREMIUM IPTV

Image

Image
User avatar
CsN^ ;x
Membru eXtream
Membru eXtream
Posts: 3560
Joined: 02 Apr 2012, 16:58
Detinator Steam: Nu
CS Status: Retras din domeniul Counter-Strike
Reputatie: Fost moderator
Location: Bucuresti
Has thanked: 797 times
Been thanked: 607 times

15 Aug 2014, 12:17

Uite imi da niste errori,am pus ce mi-ai dat tu in locul la ce avea eu si am pus si #include <dhudmessage>

Image
Addons HNS level,gravity,xp DOWNLOAD ( e țeapă)
https://5filme.com/ - un simplu site de filme pentru timpul liber
rumini_uebki
Membru, skill 0
Membru, skill 0
Posts: 49
Joined: 22 Jul 2014, 00:21
Detinator Steam: Da
Fond eXtream: 0
Has thanked: 3 times
Been thanked: 8 times
Contact:

15 Aug 2014, 13:20

Code: Select all

set_dhudmessage ( r, g, b, -1.0, 0.88, 0, 0.0, FREQ, 0.01, 0.0 );
    show_dhudmessage ( id, "%3.2f Km/h", speed, speedh );
==>

Code: Select all

set_dhudmessage ( r, g, b, -1.0, 0.88, 0, 0.0, FREQ, 0.01, 0.0 );
    show_dhudmessage ( id, "%3.2f Km/h", speed );
:meme
User avatar
CsN^ ;x
Membru eXtream
Membru eXtream
Posts: 3560
Joined: 02 Apr 2012, 16:58
Detinator Steam: Nu
CS Status: Retras din domeniul Counter-Strike
Reputatie: Fost moderator
Location: Bucuresti
Has thanked: 797 times
Been thanked: 607 times

15 Aug 2014, 14:08

Tot 4 errori imi da,dar nici nu vad diferenta X_x
Addons HNS level,gravity,xp DOWNLOAD ( e țeapă)
https://5filme.com/ - un simplu site de filme pentru timpul liber
User avatar
CryWolf
Administrator
Administrator
Posts: 6505
Joined: 07 Aug 2008, 16:33
Detinator Steam: Da
Reputatie: Administrator
Fost Scripter
Manager CS2.eXtream.Ro
Fost Detinator ZM.eXtream.Ro
Fost manager CS.eXtream.Ro
Fost manager CSGO.eXtream.Ro
Fost manager global
Location: Botosani
Discord: crywolf1989
Has thanked: 202 times
Been thanked: 850 times
Contact:

15 Aug 2014, 14:22

Da-mi PM cu sursa daca nu vrei sa o postezi aci!
NU IMI MAI DA-TI PM CU CERERE AJUTOR/SAMD, FOLOSITI FORUMUL, CITESC MAJORITATEA TOPICURILOR.
www.dark-arena.com , SERVERE CS / CS2 / L4D AU REVENIT ONLINE.
www.diasporaiptv.ro - SERVICII PREMIUM IPTV

Image

Image
User avatar
CsN^ ;x
Membru eXtream
Membru eXtream
Posts: 3560
Joined: 02 Apr 2012, 16:58
Detinator Steam: Nu
CS Status: Retras din domeniul Counter-Strike
Reputatie: Fost moderator
Location: Bucuresti
Has thanked: 797 times
Been thanked: 607 times

15 Aug 2014, 18:13

CryWolf wrote:Da-mi PM cu sursa daca nu vrei sa o postezi aci!
Am crezut ca doar acolo trebuia modificat si nu trebuia sursa,e pe net deci o pun aici.
| Afiseaza codul
[code]#include <amxmodx>
#include <fakemeta>
#include <dhudmessage>

#define PLUGIN "Speedometer"
#define VERSION "1.2"
#define AUTHOR "CaPy"

#define FREQ 0.1

new bool:plrSpeed[33]

new TaskEnt,SyncHud,showspeed,color, maxplayers, r, g, b

public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR)
	register_cvar("AcidoX", "Speedometer 1.1", FCVAR_SERVER)
	register_forward(FM_Think, "Think")
	
	TaskEnt = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "info_target"))	
	set_pev(TaskEnt, pev_classname, "speedometer_think")
	set_pev(TaskEnt, pev_nextthink, get_gametime() + 1.01)
	
	register_clcmd("say /speed", "toogleSpeed")
	
	showspeed = register_cvar("showspeed", "1")
	color = register_cvar("speed_colors", "255 165 0")
	
	SyncHud = CreateHudSyncObj()
	
	maxplayers = get_maxplayers()
	
	new colors[16], red[4], green[4], blue[4]
	get_pcvar_string(color, colors, sizeof colors - 1)
	parse(colors, red, 3, green, 3, blue, 3)
	r = str_to_num(red)
	g = str_to_num(green)
	b = str_to_num(blue)
}

public Think(ent)
{
	if(ent == TaskEnt) 
	{
		SpeedTask()
		set_pev(ent, pev_nextthink,  get_gametime() + FREQ)
	}
}

public client_putinserver(id)
{
	plrSpeed[id] = showspeed > 0 ? true : false
}

public toogleSpeed(id)
{
	plrSpeed[id] = plrSpeed[id] ? false : true
	return PLUGIN_HANDLED
}

SpeedTask()
{
	static i, target
	static Float:velocity[3]
	static Float:speed, Float:speedh
	
	for(i=1; i<=maxplayers; i++)
	{
		if(!is_user_connected(i)) continue
		if(!plrSpeed) continue
		
		target = pev(i, pev_iuser1) == 4 ? pev(i, pev_iuser2) : i
		pev(target, pev_velocity, velocity)

		speed = vector_length(velocity)
		speedh = floatsqroot(floatpower(velocity[0], 2.0) + floatpower(velocity[1], 2.0))
		
set_dhudmessage ( r, g, b, -1.0, 0.88, 0, 0.0, FREQ, 0.01, 0.0 );
    show_dhudmessage ( id, "%3.2f Km/h", speed );   
	}
}[/code]

e cum mi-a dat rumini_uebki asa am lasat.
Addons HNS level,gravity,xp DOWNLOAD ( e țeapă)
https://5filme.com/ - un simplu site de filme pentru timpul liber
User avatar
CryWolf
Administrator
Administrator
Posts: 6505
Joined: 07 Aug 2008, 16:33
Detinator Steam: Da
Reputatie: Administrator
Fost Scripter
Manager CS2.eXtream.Ro
Fost Detinator ZM.eXtream.Ro
Fost manager CS.eXtream.Ro
Fost manager CSGO.eXtream.Ro
Fost manager global
Location: Botosani
Discord: crywolf1989
Has thanked: 202 times
Been thanked: 850 times
Contact:

15 Aug 2014, 20:05

Code: Select all

#include <amxmodx>
#include <fakemeta>

#define PLUGIN "Speedometer"
#define VERSION "1.2"
#define AUTHOR "AciD"

#define FREQ 0.1

new bool:plrSpeed[33]

new TaskEnt, showspeed, color, maxplayers, r, g, b

public plugin_init() {
    register_plugin(PLUGIN, VERSION, AUTHOR)
    register_cvar("AcidoX", "Speedometer 1.1", FCVAR_SERVER)
    register_forward(FM_Think, "Think")
    
    TaskEnt = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "info_target"))    
    set_pev(TaskEnt, pev_classname, "speedometer_think")
    set_pev(TaskEnt, pev_nextthink, get_gametime() + 1.01)
    
    register_clcmd("say /speed", "toogleSpeed")
    
    showspeed = register_cvar("showspeed", "1")
    color = register_cvar("speed_colors", "255 255 255")
    
    maxplayers = get_maxplayers()
    
    new colors[16], red[4], green[4], blue[4]
    get_pcvar_string(color, colors, sizeof colors - 1)
    parse(colors, red, 3, green, 3, blue, 3)
    r = str_to_num(red)
    g = str_to_num(green)
    b = str_to_num(blue)
}

public Think(ent)
{
    if(ent == TaskEnt) 
    {
        SpeedTask()
        set_pev(ent, pev_nextthink,  get_gametime() + FREQ)
    }
}

public client_putinserver(id)
{
    plrSpeed[id] = showspeed > 0 ? true : false
}

public toogleSpeed(id)
{
    plrSpeed[id] = plrSpeed[id] ? false : true
    return PLUGIN_HANDLED
}

SpeedTask()
{
    static i, target
    static Float:velocity[3]
    static Float:speed, Float:speedh
    
    for(i=1; i<=maxplayers; i++)
    {
        if(!is_user_connected(i)) continue
        if(!plrSpeed[i]) continue
        
        target = pev(i, pev_iuser1) == 4 ? pev(i, pev_iuser2) : i
        pev(target, pev_velocity, velocity)

        speed = vector_length(velocity)
        speedh = floatsqroot(floatpower(velocity[0], 2.0) + floatpower(velocity[1], 2.0))
        
        set_dhudmessage ( r, g, b, -1.0, 0.7, 0, 0.0, FREQ, 0.01, 0.0 );
        show_dhudmessage ( i, "%3.2f units/second^n%3.2f velocity", speed, speedh );
    }
}
 
NU IMI MAI DA-TI PM CU CERERE AJUTOR/SAMD, FOLOSITI FORUMUL, CITESC MAJORITATEA TOPICURILOR.
www.dark-arena.com , SERVERE CS / CS2 / L4D AU REVENIT ONLINE.
www.diasporaiptv.ro - SERVICII PREMIUM IPTV

Image

Image
User avatar
CsN^ ;x
Membru eXtream
Membru eXtream
Posts: 3560
Joined: 02 Apr 2012, 16:58
Detinator Steam: Nu
CS Status: Retras din domeniul Counter-Strike
Reputatie: Fost moderator
Location: Bucuresti
Has thanked: 797 times
Been thanked: 607 times

15 Aug 2014, 20:12

Da 2 errory cred ca la simbol,dar nu stiu care si cum...

Image
Addons HNS level,gravity,xp DOWNLOAD ( e țeapă)
https://5filme.com/ - un simplu site de filme pentru timpul liber
Cosmin
Fost moderator
Fost moderator
Posts: 9362
Joined: 06 Jul 2013, 22:08
Detinator Steam: Da
Detinator server CS: Nu
Reputatie: Fost eXtream Mod
Fost Scripter eXtreamCS
Nume anterior: scosmynnnn
Has thanked: 492 times
Been thanked: 547 times

15 Aug 2014, 21:25

| Afiseaza codul
#include <amxmodx>
#include <dhudmessage>
#include <fakemeta>

#define PLUGIN "Speedometer"
#define VERSION "1.2"
#define AUTHOR "AciD"

#define FREQ 0.1

new bool:plrSpeed[33]

new TaskEnt, showspeed, color, maxplayers, r, g, b

public plugin_init() {
    register_plugin(PLUGIN, VERSION, AUTHOR)
    register_cvar("AcidoX", "Speedometer 1.1", FCVAR_SERVER)
    register_forward(FM_Think, "Think")
    
    TaskEnt = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "info_target"))    
    set_pev(TaskEnt, pev_classname, "speedometer_think")
    set_pev(TaskEnt, pev_nextthink, get_gametime() + 1.01)
    
    register_clcmd("say /speed", "toogleSpeed")
    
    showspeed = register_cvar("showspeed", "1")
    color = register_cvar("speed_colors", "255 255 255")
    
    maxplayers = get_maxplayers()
    
    new colors[16], red[4], green[4], blue[4]
    get_pcvar_string(color, colors, sizeof colors - 1)
    parse(colors, red, 3, green, 3, blue, 3)
    r = str_to_num(red)
    g = str_to_num(green)
    b = str_to_num(blue)
}

public Think(ent)
{
    if(ent == TaskEnt) 
    {
        SpeedTask()
        set_pev(ent, pev_nextthink,  get_gametime() + FREQ)
    }
}

public client_putinserver(id)
{
    plrSpeed[id] = showspeed > 0 ? true : false
}

public toogleSpeed(id)
{
    plrSpeed[id] = plrSpeed[id] ? false : true
    return PLUGIN_HANDLED
}

SpeedTask()
{
    static i, target
    static Float:velocity[3]
    static Float:speed, Float:speedh
    
    for(i=1; i<=maxplayers; i++)
    {
        if(!is_user_connected(i)) continue
        if(!plrSpeed) continue
        
        target = pev(i, pev_iuser1) == 4 ? pev(i, pev_iuser2) : i
        pev(target, pev_velocity, velocity)

        speed = vector_length(velocity)
        speedh = floatsqroot(floatpower(velocity[0], 2.0) + floatpower(velocity[1], 2.0))
        
        set_dhudmessage ( r, g, b, -1.0, 0.7, 0, 0.0, FREQ, 0.01, 0.0 );
        show_dhudmessage ( i, "%3.2f units/second^n%3.2f velocity", speed, speedh );
    }
}
trebuia si dhudmessage inclus acolo
User avatar
CsN^ ;x
Membru eXtream
Membru eXtream
Posts: 3560
Joined: 02 Apr 2012, 16:58
Detinator Steam: Nu
CS Status: Retras din domeniul Counter-Strike
Reputatie: Fost moderator
Location: Bucuresti
Has thanked: 797 times
Been thanked: 607 times

15 Aug 2014, 21:29

Nu stiu de ce nu m-am gandit sa adaug.
Merge,rezolvat.
Addons HNS level,gravity,xp DOWNLOAD ( e țeapă)
https://5filme.com/ - un simplu site de filme pentru timpul liber
User avatar
CryWolf
Administrator
Administrator
Posts: 6505
Joined: 07 Aug 2008, 16:33
Detinator Steam: Da
Reputatie: Administrator
Fost Scripter
Manager CS2.eXtream.Ro
Fost Detinator ZM.eXtream.Ro
Fost manager CS.eXtream.Ro
Fost manager CSGO.eXtream.Ro
Fost manager global
Location: Botosani
Discord: crywolf1989
Has thanked: 202 times
Been thanked: 850 times
Contact:

16 Aug 2014, 09:14

DAP, scuze eu folosesc AMX Mod X 1.8.3 si are dhud inclus :)
NU IMI MAI DA-TI PM CU CERERE AJUTOR/SAMD, FOLOSITI FORUMUL, CITESC MAJORITATEA TOPICURILOR.
www.dark-arena.com , SERVERE CS / CS2 / L4D AU REVENIT ONLINE.
www.diasporaiptv.ro - SERVICII PREMIUM IPTV

Image

Image
Post Reply

Return to “Modificari pluginuri”

  • Information