Cerere Modificare Plugin

Modificari necesare ale pluginurilor

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Locked
mihaialex33
Membru, skill 0
Membru, skill 0
Posts: 23
Joined: 05 Nov 2011, 14:14
Detinator Steam: Da
CS Status: Citesc forumul eXtreamCS.com...!
Has thanked: 7 times
Contact:

30 Nov 2013, 20:07

Salut eXtreamCS , am incercat sa modific si eu un plugin , dar nu imi iese

Uitati SMA :

Code: Select all

#include <  amxmodx  >
#include <  amxmisc  >
#include <  cstrike  >
#include <  fakemeta  >

#pragma semicolon 1


#define PLUGIN "Display_HP_Enemy"
#define VERSION "1.1"

#define IsPlayer(%1) ( 1 <= %1 <= g_MaxPlayers ) 

new g_MaxPlayers;

public plugin_init(    )
{
	register_plugin(  PLUGIN,  VERSION,  "MeRcyLeZZ"  );
	
	register_forward(  FM_PlayerPreThink,  "fwdPlayerPreThink"  );
	
	g_MaxPlayers  =  global_get(  glb_maxClients  );
}

public fwdPlayerPreThink(  id  )
{
	
	if(  is_user_alive(  id  )  )
	{
		
		new target, body; 
		get_user_aiming(  id,  target,  body,  9999  );
		
		new CsTeams:team  =  cs_get_user_team(  id  );
		
		if(   is_user_alive(  target  )  )
		{
			if(  IsPlayer(  target  )  )
			{
			
				new CsTeams:targetTeam  =  cs_get_user_team(  target  );
				
				new sName[  32  ];
				get_user_name(  target,   sName,  sizeof  (  sName  )  -1  );
							
				new sMessage[  64  ];
				if(  targetTeam  ==  team  )
				{
					formatex(  sMessage, sizeof  (  sMessage  )  -1, "Nume: %s | HP: %i | Armura : %s",  sName,  get_user_health(  target  ), get_user_armor(  target  )  );
				}
				else if(  targetTeam  !=  team  )
				{
					formatex(  sMessage, sizeof  (  sMessage  )  -1, "Nume: %s | HP: %i | Armura : %s",  sName,  get_user_health(  target  ), get_user_armor(  target  )  );
				}
					
				if(  targetTeam  ==  CS_TEAM_CT  )
				{
					set_hudmessage( 0, 63, 127, -1.0, -1.0, 0, 0.0, 0.1, 0.0, 0.0, -1 );
				}
				else if( targetTeam == CS_TEAM_T )
				{
					set_hudmessage( 127, 0, 0, -1.0, -1.0, 0, 0.0, 0.1, 0.0, 0.0, -1 );
				}	
				
				
				show_hudmessage(  id,  "%s",  sMessage  );
			}
		}
	}
	
	return FMRES_IGNORED;
}
As vrea dacă puteți să îmi puneți să se vadă așa :

Nume ; HP: ; Armura ; si dacă puteti doar la ZM sa apara si clasa .

Mulțumesc .
Last edited by Mădălin on 05 Dec 2013, 17:15, edited 1 time in total.
Reason: Mutat în: Modificari pluginuri
Rapidserver
mihaialex33
Membru, skill 0
Membru, skill 0
Posts: 23
Joined: 05 Nov 2011, 14:14
Detinator Steam: Da
CS Status: Citesc forumul eXtreamCS.com...!
Has thanked: 7 times
Contact:

01 Dec 2013, 11:24

UP !!!!
mihaialex33
Membru, skill 0
Membru, skill 0
Posts: 23
Joined: 05 Nov 2011, 14:14
Detinator Steam: Da
CS Status: Citesc forumul eXtreamCS.com...!
Has thanked: 7 times
Contact:

04 Dec 2013, 13:57

UP!!!!!!!
User avatar
YONTU
Moderator ajutator
Moderator ajutator
Posts: 2446
Joined: 10 May 2013, 13:25
Detinator Steam: Nu
CS Status: Everyone is looking at ur shoes
Reputatie: Moderator ajutator
Fost scripter eXtreamCS
Location: Gura Humorului
Has thanked: 255 times
Been thanked: 281 times
Contact:

04 Dec 2013, 13:59

| Afiseaza codul
#include <  amxmodx  >
#include <  amxmisc  >
#include <  cstrike  >
#include <  fakemeta  >
#include <  zombieplague  >

#pragma semicolon 1


#define PLUGIN "Display_HP_Enemy"
#define VERSION "1.1"

#define IsPlayer(%1) ( 1 <= %1 <= g_MaxPlayers ) 

new g_MaxPlayers;

public plugin_init(    )
{
   register_plugin(  PLUGIN,  VERSION,  "MeRcyLeZZ"  );
   
   register_forward(  FM_PlayerPreThink,  "fwdPlayerPreThink"  );
   
   g_MaxPlayers  =  global_get(  glb_maxClients  );
}

public fwdPlayerPreThink(  id  )
{
   
   if(  is_user_alive(  id  )  )
   {
      
      new target, body; 
      get_user_aiming(  id,  target,  body,  9999  );
      
      new CsTeams:team  =  cs_get_user_team(  id  );
      
      if(   is_user_alive(  target  )  )
      {
         if(  IsPlayer(  target  )  )
         {
         
            new CsTeams:targetTeam  =  cs_get_user_team(  target  );
            
            new sName[  32  ];
            get_user_name(  target,   sName,  sizeof  (  sName  )  -1  );
                     
            new sMessage[  64  ];
            if(  targetTeam  ==  team  )
            {
               formatex(  sMessage, sizeof  (  sMessage  )  -1, "Nume: %s | HP: %i | Armura : %s",  sName,  get_user_health(  target  ), get_user_armor(  target  )  );
            }
            else if(  targetTeam  !=  team  )
            {
               formatex(  sMessage, sizeof  (  sMessage  )  -1, "Nume: %s | HP: %i | Armura : %s",  sName,  get_user_health(  target  ), get_user_armor(  target  ), zp_get_user_class( target )  );
            }
               
            if(  targetTeam  ==  CS_TEAM_CT  )
            {
               set_hudmessage( 0, 63, 127, -1.0, -1.0, 0, 0.0, 0.1, 0.0, 0.0, -1 );
            }
            else if( targetTeam == CS_TEAM_T )
            {
               set_hudmessage( 127, 0, 0, -1.0, -1.0, 0, 0.0, 0.1, 0.0, 0.0, -1 );
            }   
            
            
            show_hudmessage(  id,  "%s",  sMessage  );
         }
      }
   }
   
   return FMRES_IGNORED;
}
„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ș

discord: IonutC#5114

Vrei sa joci pe un server de biohazard clasic specific timpurilor 2008-2012?
CLICK | Afiseaza codul
89.44.246.14:27015 biohazard clasic
User avatar
h4wk
Fost moderator
Fost moderator
Posts: 3806
Joined: 22 Sep 2009, 12:10
Detinator Steam: Da
Reputatie: Fost eXtream Mod
Nume anterior : DaZ , zimpe , Dan eXtream
Location: Iasi
Has thanked: 305 times
Been thanked: 320 times
Contact:

09 Jan 2014, 15:15

TOPIC INCHIS !
MOTIV : Titlul trebuie sa fie concis si sa reflecte, pe cat de mult posibil, continutul. Nu mai sunt acceptate titlurile de genul "Cerere modificare plugin".

Code: Select all

"Daca ai culoare nu inseamna ca esti mai presus ca un utilizator. Culoare e un fel de "rasplata" pentru ca te implici in "ridicarea" acestei comunitati.
Unii nu realizeaza ca daca ai culoare nu inseamna ca esti smecher." -- by Alexey
:troll :troll

Spui ceva,dar faci altceva !
Locked

Return to “Modificari pluginuri”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 5 guests