User
Pass
2FA
 
 

Modificare plugin

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Freakz Forum Index -> Trash Bin -> CS 2006-2019 (Archived) -> Plugins - Help / Support
Author Message1388
x4fun

[Idolu Femeilor]



Status: Offline
(since 01-06-2020 13:49)
Joined: 02 Mar 2017
Posts: 63, Topics: 23
Location: Piatra Neamt

Reputation: 46.3

 
Post Posted: 30-03-2018, 10:25:47 | Translate post to: ... (Click for more languages)

salutare vreau sa ma ajutati si pe mine modificand pluginul accesta de mai jos sa arate doar cand esti spec HP ap si numele nu si jos HP SI AP
poze cu ce vreau sa fie scos https://imgur.com/a/ZYsHW

Quote:
#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( _Love Struck );
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 }
*/

0 0
  
Back to top
View user's profile Send private message Yahoo! Messenger ID
Freakz*DuLceTeL

[S3X*p3rMaN3nTy; x ]



Status: Offline
(since 09-04-2022 10:29)
Joined: 27 Jun 2015
Posts: 15862, Topics: 2099
Location: TG-Mures

Reputation: 964.9
Votes: 668

     
Post Posted: 31-03-2018, 09:11:34 | Translate post to: ... (Click for more languages)

Uite aici : hp.sma


1 0
  
Back to top
View user's profile Send private message Yahoo! Messenger ID
x4fun

[Idolu Femeilor]



Status: Offline
(since 01-06-2020 13:49)
Joined: 02 Mar 2017
Posts: 63, Topics: 23
Location: Piatra Neamt

Reputation: 46.3

 
Post Posted: 31-03-2018, 16:58:27 | Translate post to: ... (Click for more languages)

Ai inteles gresit .
Vreau ca HP SI AP SA FIE SCOS SA APARA DOAR AIA DE LA SPEC CAND ESTI PE PLAYER

Spectating:nume
Healt
Armura (asta sa ramana )

0 0
  
Back to top
View user's profile Send private message Yahoo! Messenger ID
Freakz*DuLceTeL

[S3X*p3rMaN3nTy; x ]



Status: Offline
(since 09-04-2022 10:29)
Joined: 27 Jun 2015
Posts: 15862, Topics: 2099
Location: TG-Mures

Reputation: 964.9
Votes: 668

     
Post Posted: 31-03-2018, 20:55:17 | Translate post to: ... (Click for more languages)

Ți so modificat ce mi-ai cerut.. Si aia am facut..acuma le vrei altfel.. Maine il modific


0 0
  
Back to top
View user's profile Send private message Yahoo! Messenger ID
x4fun

[Idolu Femeilor]



Status: Offline
(since 01-06-2020 13:49)
Joined: 02 Mar 2017
Posts: 63, Topics: 23
Location: Piatra Neamt

Reputation: 46.3

 
Post Posted: 01-04-2018, 16:58:13 | Translate post to: ... (Click for more languages)

up
0 0
  
Back to top
View user's profile Send private message Yahoo! Messenger ID
Freakz*DuLceTeL

[S3X*p3rMaN3nTy; x ]



Status: Offline
(since 09-04-2022 10:29)
Joined: 27 Jun 2015
Posts: 15862, Topics: 2099
Location: TG-Mures

Reputation: 964.9
Votes: 668

     
Post Posted: 01-04-2018, 20:27:45 | Translate post to: ... (Click for more languages)

Acum cred ca e cum vrei tu Aici


1 0
  
Back to top
View user's profile Send private message Yahoo! Messenger ID
x4fun

[Idolu Femeilor]



Status: Offline
(since 01-06-2020 13:49)
Joined: 02 Mar 2017
Posts: 63, Topics: 23
Location: Piatra Neamt

Reputation: 46.3

 
Post Posted: 02-04-2018, 09:48:56 | Translate post to: ... (Click for more languages)

mersi dati tc
0 0
  
Back to top
View user's profile Send private message Yahoo! Messenger ID
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Freakz Forum Index -> Trash Bin -> CS 2006-2019 (Archived) -> Plugins - Help / Support  


The time now is 07-05-2024, 21:17:59
Copyright info

Based on phpBB ro/com
B

 
 
 







I forgot my password


This message appears only once, so
like us now until it's too late ! :D
x