New HUD System( Show AP / HP )

Pluginuri facute de utilizatorii forumului eXtream.

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

User avatar
YONTU
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 2466
Joined: 10 May 2013, 14:25
Detinator Steam: Nu
CS Status: Everyone is looking at ur shoes
Reputatie: Moderator ajutator
Fost scripter eXtreamCS
Location: Gura Humorului
Has thanked: 256 times
Been thanked: 288 times
Contact:

15 Feb 2014, 11:38

Descriere: Acest plugin ascunde viata si armura si le inlocuieste cu un alt "scris". Vedeti pozele mai jos sa va dati seama.
Descarcare v1.0.0: GirlShare! | ZippyShare!
SMA v1.0 | Afiseaza codul
#include < amxmodx >
#include < fakemeta >
#include < hamsandwich >

new const PLUGIN_NAME[  ] = "New HUD System( Show AP / HP )";
new const PLUGIN_VERSION[  ] = "1.0";
new const PLUGIN_AUTHOR[  ] = "YONTU";

#define ColorRed		0
#define ColorGreen	255
#define ColorBlue		0

#define SpecColorRed	0
#define SpecColorGreen	200
#define SpecColorBlue	200

// Thanks Aragon for this codes( director HUD )
#define clamp_byte(%1)		( clamp( %1, 0, 255 ) )
#define pack_color(%1,%2,%3)	( %3 + ( %2 << 8 ) + ( %1 << 16 ) )

const PEV_SPEC_TARGET = pev_iuser2;

new SyncHudMessage;

new g_cvar_show_type;

public plugin_init(  ) {

	register_plugin( PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR );
	
	register_event( "ResetHUD", "event_ResetHud", "be" );

	RegisterHam( Ham_Spawn, "player", "Ham_PlayerSpawnedPost", 1 );

	g_cvar_show_type = register_cvar( "nhs_show", "1" );

	SyncHudMessage = CreateHudSyncObj(  );
}

public Ham_PlayerSpawnedPost( id )
	if( is_user_connected( id ) )
		set_task( 1.0, "ShowHud", id, _, _, "b" );

public event_ResetHud( id )
	ShowHud( id );

public ShowHud( id ) {

	switch( get_pcvar_num( g_cvar_show_type ) ) {

		case 0: {

			if( is_user_alive( id ) && ( get_user_team( id ) == 1 || get_user_team( id ) == 2 ) ) {

				new szMessage[ 256 ];
				formatex( szMessage, sizeof( szMessage ) - 1,"Health: %d   Armor: %d", get_user_health( id ), get_user_armor( id ) );

				set_hudmessage( ColorRed, ColorGreen, ColorBlue, 0.02, 0.94, 0, 0.5, 15.0, 2.0, 2.0, -1 );
				ShowSyncHudMsg( id, SyncHudMessage, szMessage );

				set_pdata_int( id, 361, get_pdata_int( id, 361 ) | ( 1<<3 ) );
			}

			else {

				new idSpec;
				new szPlayerName[ 32 ];

				idSpec = pev( id, PEV_SPEC_TARGET );
				get_user_name( idSpec, szPlayerName, 31 );

				set_hudmessage( SpecColorRed, SpecColorGreen, SpecColorBlue, -1.0, 0.7, 0, 0.5, 15.0, 2.0, 2.0, -1 );
				ShowSyncHudMsg( id, SyncHudMessage, "Spectating: %s^nHealth: %d^nArmor: %d", szPlayerName, get_user_health( idSpec ), get_user_armor( idSpec ) );
			}
		}

		case 1: {
	
			if( is_user_connected( id ) && is_user_alive( id ) && ( get_user_team( id ) == 1 || get_user_team( id ) == 2 ) ) {

				new szMessage[ 256 ];
				formatex( szMessage, sizeof( szMessage ) - 1,"Health: %d   Armor: %d", get_user_health( id ), get_user_armor( id ) );

				ShowHudMessage( id, szMessage, ColorRed, ColorGreen, ColorBlue, 0.02, 0.94, 0, _, 1.0 );

				set_pdata_int( id, 361, get_pdata_int( id, 361 ) | ( 1<<3 ) );
			}

			else {

				new idSpec;
				new szPlayerName[ 32 ];

				idSpec = pev( id, PEV_SPEC_TARGET );
				get_user_name( idSpec, szPlayerName, 31 );

				new szMessage[ 256 ];
				formatex( szMessage, sizeof( szMessage ) - 1,"Spectating: %s^nHealth: %d^nArmor: %d", szPlayerName, get_user_health( idSpec ), get_user_armor( idSpec ) );

				ShowHudMessage( id, szMessage, SpecColorRed, SpecColorGreen, SpecColorBlue, -1.0, 0.7, 0, _, 1.0 );
			}
		}
	}
}

stock ShowHudMessage( const id, const szMessage[  ], red = 0, green = 160, blue = 0, Float:x = -1.0, Float:y = 0.65, effects = 2, Float:fxtime = 0.01, Float:holdtime = 3.0, Float:fadeintime = 0.01, Float:fadeouttime = 0.01 ) {

	new iCount = 1, szPlayers[ 32 ];
	
	if( id )
		szPlayers[ 0 ] = id;

	else
	get_players( szPlayers, iCount, "ch"); {

		for( new i = 0; i < iCount; i++ ) {

			if( is_user_connected( szPlayers[ i ] ) ) {

				new iColor = pack_color( clamp_byte( red ), clamp_byte( green ), clamp_byte( blue ) )
				
				message_begin( MSG_ONE_UNRELIABLE, SVC_DIRECTOR, _, szPlayers[ i ] );
				write_byte( strlen( szMessage ) + 31 );
				write_byte( DRC_CMD_MESSAGE );
				write_byte( effects );
				write_long( iColor );
				write_long( _:x );
				write_long( _:y );
				write_long( _:fadeintime );
				write_long( _:fadeouttime );
				write_long( _:holdtime );
				write_long( _:fxtime );
				write_string( szMessage );
				message_end(  );
			}
		}
	}
}

/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1048\\ f0\\ fs16 \n\\ par }
*/
Nume: New HUD System
Versiune: 1.0
Link oficial: Aici.

Instalare:
1. Fisierul new_hud_system.sma il puneti in addons/amxmodx/scripting !
2. Fisierul new_hud_system.amxx il puneti in addons/amxmodx/plugins !
3. Intrati in fisierul addons/amxmodx/configs/plugins.ini si adaugati la urma:

Code: Select all

new_hud_system.amxx
4. Alti pasi necesari...
Cvar-uri (se adauga in fisierul amxmodx\configs\amxx.cfg):
  • nhs_show "0 / 1" default 1:
    * 0 - Afiseaza viata si armura in HUD folosind sistemul default
    * 1 - Afiseaza viata si armura in HUD folosinf directorul HUD
Comenzi administrative (se tasteaza in consola si trebuie sa fiti administrator):
-

Comenzi publice (se tasteaza in joc prin apasarea tastei Y):
  • -
Module necesare (se sterge ; din fata modulului de mai jos; acestea le gasiti in fisierul amxmodx\configs\modules.ini):
- Fakemeta;
- Hamsandwich;
Credite | Afiseaza codul
https://wiki.alliedmods.net/CBasePlayer_(CS) - Valorile si Offestt-uirle extrase de aici.
Imagini | Afiseaza codul
DHUD:
Image

Image

Deafult:
Image

Image
Alte informatii | Afiseaza codul
// Aici modificati culorile dupa bunul plac
#define ColorRed		0
#define ColorGreen	255
#define ColorBlue		0

// Aici modificati culorile dupa bunul plac atunci cand stati spectator pe cineva
#define SpecColorRed	0
#define SpecColorGreen	200
#define SpecColorBlue	200
„Peste douăzeci de ani vei fi dezamăgit din cauza lucrurilor pe care nu le-ai făcut, nu din cauza celor pe care le-ai făcut.” - Mark Twain
„Asa e si in viata, hotii castiga, prostii care invata pierd.” - Mihai Nemeș


Bio.LeagueCs.Ro - Biohazard v4.4 Xmas Edition
discord: IonutC#5114

Experinta in: Java/Spring boot/Angular/C/C++/C#/Javascript/Python/HTML/CSS/Pawn/SQL
Ai nevoie de ajutorul meu? Ma poti gasi doar la adresa de discord de mai sus.
TrrrQ
Fost moderator
Fost moderator
Posts: 2594
Joined: 04 Feb 2013, 00:31
Detinator Steam: Da
Reputatie: Membru Club eXtreamCS (3 luni)
Restrictie moderator!
Unban achitat (x2)
Fost moderator
Fond eXtream: 8
Has thanked: 135 times
Been thanked: 67 times
Contact:

15 Feb 2014, 11:40

frumos plugin , mulţumim
Filme Online HD subtitrate fără reclame automate: https://filmeonline-hd.com
Prezentarea site-ului: https://www.youtube.com/watch?v=k4K3tgEkYjw
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 Feb 2014, 11:48

Frumos dar daca faceai toate hudurile gen si la timp si la banii era frumos :)
Addons HNS level,gravity,xp DOWNLOAD ( e țeapă)
https://5filme.com/ - un simplu site de filme pentru timpul liber
User avatar
Te-am_prins
Membru, skill +3
Membru, skill +3
Posts: 1227
Joined: 25 Jan 2014, 16:32
Detinator Steam: Da
Detinator server CS: 89.40.233.130
SteamID: Fix pe asta il stiu
Reputatie: Fost moderator
Membru Club eXtreamCS (7 luni)
1 avertisment scos (-2 luni club)
-1 warn (anti-tepari shop)
Location: Bucuresti
Has thanked: 34 times
Been thanked: 90 times
Contact:

15 Feb 2014, 13:58

Bravo.foarte frumos :)
Image
Moderatorul anului 2k17 in actiune
Image
User avatar
Ulquiorra
Fost moderator
Fost moderator
Posts: 2053
Joined: 25 Jul 2010, 17:29
Detinator Steam: Da
CS Status: A mai trecut o zi asteptand una mai buna
Detinator server CS: Retras.
SteamID: STEAM_0:1:318247XX
Reputatie: Fost Scripter eXtreamCS
Fost Moderator ajutator
Nick anterior: Askhanar
Location: Braila, Romania.
Has thanked: 215 times
Been thanked: 1132 times

15 Feb 2014, 14:19

nu aragon a facut dhud :P
http://forums.alliedmods.net/showthread.php?t=149210

deci ai gresit creditele :))
| Afiseaza codul
// Thanks Aragon for this codes( director HUD )
#define clamp_byte(%1)		( clamp( %1, 0, 255 ) )
#define pack_color(%1,%2,%3)	( %3 + ( %2 << 8 ) + ( %1 << 16 ) )
in rest.. ai mai gresit aici..
| Afiseaza codul
public Ham_PlayerSpawnedPost( id )
	if( is_user_connected( id ) )
		set_task( 1.0, "ShowHud", id, _, _, "b" );
la fiecare spawn ii pui un task la o secunda.. foloseste un task unic.. si verifica daca il are.. ori fa un public global in care iei playerii ;)
Caut o persoana dedicata care se pricepe si stie ce face.
Vreau sa creeze si sa se ocupe de administrarea unui server de MU, da e vorba de vechiul joc..ma gandesc undeva la un season 3 ep1/2.

O sa achizitionez un domeniu .ro.
Totodata sponsorizez absolut orice este necesar.
Ma puteti contacta prin: http://solo.to/stfrzv
User avatar
Hades Ownage
Membru eXtream
Membru eXtream
Posts: 3182
Joined: 22 Oct 2008, 10:12
Detinator Steam: Da
Detinator server CS: jb.clutch.ro
SteamID: hades-source
Reputatie: Fost Super Moderator
Fost Scripter eXtreamCS
Nume anterior: hadesownage
Location: Iasi
Has thanked: 324 times
Been thanked: 406 times

15 Feb 2014, 14:26

iti ascunde si radarul.
munir
Membru eXtream
Membru eXtream
Posts: 3193
Joined: 30 Aug 2012, 22:16
Detinator Steam: Da
CS Status: Fost scripter
Detinator server CS: Nu
SteamID: -
Reputatie: Fost super moderator
Restrictie schimbare nume
Nume anterior: falseq, cruyff
Location: Bucuresti
Has thanked: 342 times
Been thanked: 571 times
Contact:

15 Feb 2014, 14:35

Code: Select all

	if( is_user_connected( id ) && is_user_alive( id ) &&
Odata ce verifici daca playerul este in viata numai trebuie sa verifici daca este si conectat.
Retras
User avatar
YONTU
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 2466
Joined: 10 May 2013, 14:25
Detinator Steam: Nu
CS Status: Everyone is looking at ur shoes
Reputatie: Moderator ajutator
Fost scripter eXtreamCS
Location: Gura Humorului
Has thanked: 256 times
Been thanked: 288 times
Contact:

15 Feb 2014, 20:08

@CsN^: Nu cunosc offset-urile si valorile pentru eliminarea timpului si a nr. de gloante! :-??

@Askhanar: Am extras stock-ul dintr-un plugin d-al lui Aragon( Am comparat si testat stokc-ul lui si cu dHUD si nu exista diferente :)) ) si d-aia l.am pus la credite.
Faza cu task-ul :-? ! Revin cu edit la primul topic!

@Hades Ownage: Am observat. Nu stiu de ce :-?? !

@cruyff: Am extras functia din pluginul meu( ala cu punctele )! Vorba asta ai auzit-o si tu de la KronoS ;) ! Oricum ms, de corectare!
„Peste douăzeci de ani vei fi dezamăgit din cauza lucrurilor pe care nu le-ai făcut, nu din cauza celor pe care le-ai făcut.” - Mark Twain
„Asa e si in viata, hotii castiga, prostii care invata pierd.” - Mihai Nemeș


Bio.LeagueCs.Ro - Biohazard v4.4 Xmas Edition
discord: IonutC#5114

Experinta in: Java/Spring boot/Angular/C/C++/C#/Javascript/Python/HTML/CSS/Pawn/SQL
Ai nevoie de ajutorul meu? Ma poti gasi doar la adresa de discord de mai sus.
User avatar
Good.
Membru, skill +2
Membru, skill +2
Posts: 848
Joined: 17 Aug 2012, 10:04
Detinator Steam: Da
Reputatie: Restrictie moderator!
Membru Club eXtreamCS (2 luni)
Nume anterior: []GooD[]
Location: Bucuresti
Has thanked: 188 times
Been thanked: 34 times
Contact:

15 Feb 2014, 21:04

Super, il folosesc.

Multumesc.
User avatar
Hades Ownage
Membru eXtream
Membru eXtream
Posts: 3182
Joined: 22 Oct 2008, 10:12
Detinator Steam: Da
Detinator server CS: jb.clutch.ro
SteamID: hades-source
Reputatie: Fost Super Moderator
Fost Scripter eXtreamCS
Nume anterior: hadesownage
Location: Iasi
Has thanked: 324 times
Been thanked: 406 times

15 Feb 2014, 23:41

Nu ai ce sa-i faci, am incercat si eu sa o rezolv. Asa e el, le elimina toate 3 ( radar, armor, health ).
JooonnnX
Membru, skill +1
Membru, skill +1
Posts: 122
Joined: 13 Feb 2014, 19:05
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Has thanked: 18 times
Been thanked: 1 time
Contact:

18 Feb 2014, 19:51

Nu merge :(( ce sa fac? nu da erori sau ceva.. :(
User avatar
YONTU
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 2466
Joined: 10 May 2013, 14:25
Detinator Steam: Nu
CS Status: Everyone is looking at ur shoes
Reputatie: Moderator ajutator
Fost scripter eXtreamCS
Location: Gura Humorului
Has thanked: 256 times
Been thanked: 288 times
Contact:

18 Feb 2014, 19:52

Imposibil sa nu mearga :)) !
„Peste douăzeci de ani vei fi dezamăgit din cauza lucrurilor pe care nu le-ai făcut, nu din cauza celor pe care le-ai făcut.” - Mark Twain
„Asa e si in viata, hotii castiga, prostii care invata pierd.” - Mihai Nemeș


Bio.LeagueCs.Ro - Biohazard v4.4 Xmas Edition
discord: IonutC#5114

Experinta in: Java/Spring boot/Angular/C/C++/C#/Javascript/Python/HTML/CSS/Pawn/SQL
Ai nevoie de ajutorul meu? Ma poti gasi doar la adresa de discord de mai sus.
Post Reply

Return to “Pluginuri eXtream”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 10 guests