Skocz do zawartości

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

Dołączona grafika Dołączona grafika

Guest Message by DevFuse
 

Zdjęcie
Klasa

Prośba o dodanie umiejętności do klasy

klasa

  • Nie możesz napisać tematu
  • Zaloguj się, aby dodać odpowiedź
5 odpowiedzi w tym temacie

#1 m1tzz

    Pomocny

  • Użytkownik

Reputacja: 1
Nowy

  • Postów:55
Offline

Napisano 24.05.2022 13:54

Witam, byłby ktoś w stanie dodać do tej klasy 2x większy DMG, gdy bijesz w plecy z góry Dzięki.

Załączone pliki


Użytkownik m1tzz edytował ten post 24.05.2022 13:56

  • +
  • -
  • 0

#2 m1tzz

    Pomocny

  • Autor tematu
  • Użytkownik

Reputacja: 1
Nowy

  • Postów:55
Offline

Napisano 25.05.2022 14:44

ref


  • +
  • -
  • 0

#3 mlekovita

    Zaawansowany

  • Użytkownik

Reputacja: 7
Nowy

  • Postów:149
  • Imię:Dawid
Offline

Napisano 25.05.2022 22:45

#include <amxmodx>
#include <amxmisc>
#include <codmod>
#include <fakemeta>
        
new const nazwa[]   = "test";
new const opis[]    = "test";
new const bronie    = (1<<CSW_USP)|(1<<CSW_AK47);
new const zdrowie   = 10;
new const kondycja  = 10;
new const inteligencja = 10;
new const wytrzymalosc = 5;
    
new skoki[33];

new ma_klase[33];

public plugin_init()
{
	register_plugin(nazwa, "1.0", "amxx.pl");

	cod_register_class(nazwa, opis, bronie, zdrowie, kondycja, inteligencja, wytrzymalosc);
   
	register_forward(FM_CmdStart, "fwCmdStart_MultiJump");
	RegisterHam(Ham_TakeDamage, "player", "takeDamage", 0);

}

public cod_class_enabled(id)
{
	if(!(get_user_flags(id) & ADMIN_LEVEL_H))
	{
		client_print(id, print_chat, "[[P] test] Nie masz uprawnien, aby uzywac tej klasy.")
		return COD_STOP;
	}
	ma_klase[id] = true;
   
	return COD_CONTINUE;
}

public cod_class_disabled(id)
{
	ma_klase[id] = false;

}

public fwCmdStart_MultiJump(id, uc_handle)
{
	if(!is_user_alive(id) || !ma_klase[id])
		return FMRES_IGNORED;

	new flags = pev(id, pev_flags);

	if((get_uc(uc_handle, UC_Buttons) & IN_JUMP) && !(flags & FL_ONGROUND) && !(pev(id, pev_oldbuttons) & IN_JUMP) && skoki[id])
	{
		skoki[id]--;
		new Float:velocity[3];
		pev(id, pev_velocity,velocity);
		velocity[2] = random_float(265.0,285.0);
		set_pev(id, pev_velocity,velocity);
	}
	else if(flags & FL_ONGROUND)
		skoki[id] = 2;

	return FMRES_IGNORED;
}

public takeDamage(this, idinflictor, idattacker, Float:damage, damagebits){
	if(((IsPlayer(idattacker) && is_user_connected(idattacker) && (ioid=idattacker)) ||
	(ioid=pev(idinflictor, pev_owner) && IsPlayer(ioid) && is_user_connected(ioid)))){
	if(get_pdata_int(ioid , m_LastHitGroup) == 2) damage*=2.0;
	}
}

  • +
  • -
  • 1

#4 m1tzz

    Pomocny

  • Autor tematu
  • Użytkownik

Reputacja: 1
Nowy

  • Postów:55
Offline

Napisano 26.05.2022 15:09

#include <amxmodx>
#include <amxmisc>
#include <codmod>
#include <fakemeta>
        
new const nazwa[]   = "test";
new const opis[]    = "test";
new const bronie    = (1<<CSW_USP)|(1<<CSW_AK47);
new const zdrowie   = 10;
new const kondycja  = 10;
new const inteligencja = 10;
new const wytrzymalosc = 5;
    
new skoki[33];

new ma_klase[33];

public plugin_init()
{
	register_plugin(nazwa, "1.0", "amxx.pl");

	cod_register_class(nazwa, opis, bronie, zdrowie, kondycja, inteligencja, wytrzymalosc);
   
	register_forward(FM_CmdStart, "fwCmdStart_MultiJump");
	RegisterHam(Ham_TakeDamage, "player", "takeDamage", 0);

}

public cod_class_enabled(id)
{
	if(!(get_user_flags(id) & ADMIN_LEVEL_H))
	{
		client_print(id, print_chat, "[[P] test] Nie masz uprawnien, aby uzywac tej klasy.")
		return COD_STOP;
	}
	ma_klase[id] = true;
   
	return COD_CONTINUE;
}

public cod_class_disabled(id)
{
	ma_klase[id] = false;

}

public fwCmdStart_MultiJump(id, uc_handle)
{
	if(!is_user_alive(id) || !ma_klase[id])
		return FMRES_IGNORED;

	new flags = pev(id, pev_flags);

	if((get_uc(uc_handle, UC_Buttons) & IN_JUMP) && !(flags & FL_ONGROUND) && !(pev(id, pev_oldbuttons) & IN_JUMP) && skoki[id])
	{
		skoki[id]--;
		new Float:velocity[3];
		pev(id, pev_velocity,velocity);
		velocity[2] = random_float(265.0,285.0);
		set_pev(id, pev_velocity,velocity);
	}
	else if(flags & FL_ONGROUND)
		skoki[id] = 2;

	return FMRES_IGNORED;
}

public takeDamage(this, idinflictor, idattacker, Float:damage, damagebits){
	if(((IsPlayer(idattacker) && is_user_connected(idattacker) && (ioid=idattacker)) ||
	(ioid=pev(idinflictor, pev_owner) && IsPlayer(ioid) && is_user_connected(ioid)))){
	if(get_pdata_int(ioid , m_LastHitGroup) == 2) damage*=2.0;
	}
}

Przy kompilacji: 

error 017: undefined symbol "RegisterHam"

warning 215: expression has no effect
warning 215: expression has no effect
warning 215: expression has no effect
error 001: expected token: ";", but found ")"
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line

 


  • +
  • -
  • 0

#5 m1tzz

    Pomocny

  • Autor tematu
  • Użytkownik

Reputacja: 1
Nowy

  • Postów:55
Offline

Napisano 27.05.2022 18:47

ref


  • +
  • -
  • 0

#6 PANDA_2zl

    Guru

  • Power User

Reputacja: 177
Profesjonalista

  • Postów:722
  • Imię:Michał
  • Lokalizacja:Kraków
Online

Napisano 27.05.2022 21:05

#include <amxmodx>
#include <amxmisc>
#include <codmod>
#include <fakemeta>
#include <hamsandwich>
        
new const nazwa[]   = "test";
new const opis[]    = "test";
new const bronie    = (1<<CSW_USP)|(1<<CSW_AK47);
new const zdrowie   = 10;
new const kondycja  = 10;
new const inteligencja = 10;
new const wytrzymalosc = 5;
    
new skoki[33];

new ma_klase[33];

const m_LastHitGroup = 75

public plugin_init()
{
	register_plugin(nazwa, "1.0", "amxx.pl");

	cod_register_class(nazwa, opis, bronie, zdrowie, kondycja, inteligencja, wytrzymalosc);
   
	register_forward(FM_CmdStart, "fwCmdStart_MultiJump");
	RegisterHam(Ham_TakeDamage, "player", "takeDamage", 0);

}

public cod_class_enabled(id)
{
	if(!(get_user_flags(id) & ADMIN_LEVEL_H))
	{
		client_print(id, print_chat, "[[P] test] Nie masz uprawnien, aby uzywac tej klasy.")
		return COD_STOP;
	}
	ma_klase[id] = true;
   
	return COD_CONTINUE;
}

public cod_class_disabled(id)
{
	ma_klase[id] = false;

}

public fwCmdStart_MultiJump(id, uc_handle)
{
	if(!is_user_alive(id) || !ma_klase[id])
		return FMRES_IGNORED;

	new flags = pev(id, pev_flags);

	if((get_uc(uc_handle, UC_Buttons) & IN_JUMP) && !(flags & FL_ONGROUND) && !(pev(id, pev_oldbuttons) & IN_JUMP) && skoki[id])
	{
		skoki[id]--;
		new Float:velocity[3];
		pev(id, pev_velocity,velocity);
		velocity[2] = random_float(265.0,285.0);
		set_pev(id, pev_velocity,velocity);
	}
	else if(flags & FL_ONGROUND)
		skoki[id] = 2;

	return FMRES_IGNORED;
}

public takeDamage(this, idinflictor, idattacker, Float:damage, damagebits){
	if(is_user_alive(this))
	{
		if(get_pdata_int(this , m_LastHitGroup) == 2) damage*=2.0;
	}
}

musisz stestować


  • +
  • -
  • 0





Również z jednym lub większą ilością słów kluczowych: klasa

Użytkownicy przeglądający ten temat: 0

0 użytkowników, 0 gości, 0 anonimowych