Jump to content


Witamy w Nieoficjalnym polskim support'cie AMX Mod X

Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.
  • Rozpoczynaj nowe tematy i odpowiedaj na inne
  • Zapisz się do tematów i for, aby otrzymywać automatyczne uaktualnienia
  • Dodawaj wydarzenia do kalendarza społecznościowego
  • Stwórz swój własny profil i zdobywaj nowych znajomych
  • Zdobywaj nowe doświadczenia

Posted Image Posted Image

Guest Message by DevFuse
 

Hp show


  • This topic is locked This topic is locked
4 replies to this topic

#1 K1cK_PL

    Wszechpomocny

  • Użytkownik

  • Reputacja: 18
    Początkujący

  • Postów:315
  • Lokalizacja:Gdynia
Offline

Posted 14.07.2010 20:26

Witam mam pewien preonlem z przerobieniem pluginu HP_SHOW

oto plugin
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>

#define PLUGIN "Real HP"
#define VERSION "1.0"
#define AUTHOR "R3X"

#define CHANNEL 1
#define FRAMES 10

public plugin_init()
{
	register_plugin(PLUGIN, VERSION, AUTHOR)
	register_message(get_user_msgid("Health"),"message_health");
	
	register_forward(FM_PlayerPreThink, "fwPreThink", 1);
}
public message_health(msg_id,msg_dest,msg_entity)
{
	if(pev(msg_entity, pev_health) >= 255)
	{
		set_msg_arg_int(1, ARG_BYTE, 255);
	}
	return PLUGIN_CONTINUE;
}
public fwPreThink(id)
{
	if(!is_user_alive(id))
		return FMRES_IGNORED;
	static iCounter[33]={0,...};
	if(++iCounter[id] >= FRAMES)
	{
		set_hudmessage(0, 200, 200, 0.02, 0.91,0,0.0, 0.5,0.0,0.0,CHANNEL );
		show_hudmessage(id, "HP: %d", pev(id, pev_health));
		iCounter[id]=0;
	}
	return FMRES_IGNORED;
}


Przemienilem to na to

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

#define PLUGIN "Real HP"
#define VERSION "1.0"
#define AUTHOR "R3X"

#define CHANNEL 1
#define FRAMES 10

public plugin_init()
{
	register_plugin(PLUGIN, VERSION, AUTHOR)
	register_message(get_user_msgid("Health"),"message_health");
	register_message(get_user_msgid("armorr"),"message_armorr");
	register_forward(FM_PlayerPreThink, "fwPreThink", 1);
	register_forward(FM_PlayerPreThink, "fwPreThink", 2);
}
public message_health(msg_id,msg_dest,msg_entity)
{
	if(pev(msg_entity, pev_health) >= 255)
	{
		set_msg_arg_int(1, ARG_BYTE, 255);
	}
	return PLUGIN_CONTINUE;
}
public message_armorr(msg_id,msg_dest,msg_entity)
{
	if(pev(msg_entity, pev_armorr) >= 150)
	{
		set_msg_arg_int(1, ARG_BYTE, 255);
	}
	return PLUGIN_CONTINUE;
}
public fwPreThink(id)
{
	if(!is_user_alive(id))
		return FMRES_IGNORED;
	static iCounter[33]={0,...};
	if(++iCounter[id] >= FRAMES)
	{
		set_hudmessage(0, 200, 200, 0.02, 0.91,0,0.0, 0.5,0.0,0.0,CHANNEL );
		show_hudmessage(id, "HP: %d", pev(id, pev_health));
		iCounter[id]=0;
	}
	return FMRES_IGNORED;
}

1.error niemoge znależć pliku wyjsciowego kompilacji

Gdzie jest blad ???
  • +
  • -
  • 0

#2 Cypis'

    Master

  • Przyjaciel

  • Reputacja: 1,162
    Super Hero

  • Postów:965
  • GG:
  • Steam:steam
  • Lokalizacja:polska
Offline

Posted 14.07.2010 20:41

nie dodałeś zeby wyświetlało ile masz kamizeli
  • +
  • -
  • 0

#3 K1cK_PL

    Wszechpomocny

  • Autor tematu
  • Użytkownik

  • Reputacja: 18
    Początkujący

  • Postów:315
  • Lokalizacja:Gdynia
Offline

Posted 15.07.2010 12:08

tzn?
jak to ma wygladac
  • +
  • -
  • 0

#4 DarkGL

    Nie oddam ciasteczka !

  • Administrator

  • Reputacja: 6,559
    Godlike

  • Postów:11,993
  • GG:
  • Steam:steam
  • Imię:Rafał
  • Lokalizacja:Warszawa
Offline

Posted 15.07.2010 12:54

Spoiler

dałem ci ten kod ale wiem że on nie dizałą bo nie ma eventu zmiany armora także
get_user_msgid("armorr") nie zadziała ;)
  • +
  • -
  • 1

#5 K1cK_PL

    Wszechpomocny

  • Autor tematu
  • Użytkownik

  • Reputacja: 18
    Początkujący

  • Postów:315
  • Lokalizacja:Gdynia
Offline

Posted 15.07.2010 13:21

Dziala thx
  • +
  • -
  • 0




  


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users

Coinsy CSGOPolygon Za SMS, PSC , Przelew - CoinSell.pro
Skiny do CS:GO za SMS, PSC, Przelew - CSGOPaka.com
Automatyczny Bot Levelowania Steam - LVLUPSteam.com
CSGO Gambling Sites and Free Betting Codes - DreamCodes.gg

Sign In