/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#include <codmod>
#include <fun>
#include <hamsandwich>
#include <fakemeta>
#define DMG_BULLET (1<<1)
#define DMG_HE (1<<24)
new bool:ma_klase[33];
new const nazwa[] = "Phantom (Premium)";
new const opis[] = "Klasa premium, dodatkowe 25 procent obrazen z M4A1 1/2 he 1/3 Awp, dodatkowy xp";
new const bronie = 1<<CSW_M4A1 | 1<<CSW_HEGRENADE | 1<<CSW_AWP | 1<<CSW_DEAGLE ;
new const zdrowie = 25;
new const kondycja = 25;
new const inteligencja = 25;
new const wytrzymalosc = 25;
public plugin_init()
{
register_plugin(nazwa, "1.0", "QTM_Peyote");
cod_register_class(nazwa, opis, bronie, zdrowie, kondycja, inteligencja, wytrzymalosc);
RegisterHam(Ham_TakeDamage, "player", "TakeDamage");
register_event("DeathMsg", "Death", "ade");
register_forward(FM_PlayerPreThink, "PreThink");
register_forward(FM_UpdateClientData, "UpdateClientData", 1)
}
public cod_class_enabled(id)
set_user_footsteps(id, 1);
{
if(!(get_user_flags(id) & ADMIN_LEVEL_G))
{
client_print(id, print_chat, "Nie masz praw do tej klasy")
return COD_STOP;
}
ma_klase[id] = true;
return COD_CONTINUE;
}
public cod_class_disabled(id)
{
set_user_footsteps(id, 0);
ma_klase[id] = false;}
public TakeDamage(this, idinflictor, idattacker, Float:damage, damagebits)
{
if(!is_user_connected(idattacker))
return HAM_IGNORED;
if(!ma_klase[idattacker])
return HAM_IGNORED;
if(get_user_weapon(idattacker) == CSW_M4A1 && damagebits & DMG_BULLET)
cod_inflict_damage(idattacker, this, damage*0.45, 0.0, idinflictor, damagebits);
if(get_user_weapon(idattacker) == CSW_DEAGLE && damagebits & DMG_BULLET)
cod_inflict_damage(idattacker, this, damage*0.55, 0.0, idinflictor, damagebits);
if(get_user_weapon(idattacker) == CSW_AWP && !random(3) && damagebits & DMG_BULLET)
cod_inflict_damage(idattacker, this, float(get_user_health(this))-damage+1.0, 0.0, idinflictor, damagebits);
if(damagebits & DMG_HE && !random(1))
cod_inflict_damage(idattacker, this, float(get_user_health(this))-damage+1.0, 0.0, idinflictor, damagebits);
return HAM_IGNORED;
}
public Death(id)
{
new attacker = read_data(1);
if(!is_user_connected(attacker))
return PLUGIN_CONTINUE;
if(!ma_klase[attacker])
return PLUGIN_CONTINUE;
if(get_user_team(id) != get_user_team(attacker))
cod_set_user_xp(id, cod_get_user_xp(id)+460);
return PLUGIN_CONTINUE;
}
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.
|
Guest Message by DevFuse
4 odpowiedzi w tym temacie
#1
Napisano 27.12.2011 10:54
Witam klasa mi się nie compiluje pomógł by ktoś i powiedział co jest źle dam ++
#2
Napisano 27.12.2011 11:25
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#include <codmod>
#include <fun>
#include <hamsandwich>
#include <fakemeta>
#define DMG_BULLET (1<<1)
#define DMG_HE (1<<24)
new bool:ma_klase[33];
new const nazwa[] = "Phantom (Premium)";
new const opis[] = "Klasa premium, dodatkowe 25 procent obrazen z M4A1 1/2 he 1/3 Awp, dodatkowy xp";
new const bronie = 1<<CSW_M4A1 | 1<<CSW_HEGRENADE | 1<<CSW_AWP | 1<<CSW_DEAGLE ;
new const zdrowie = 25;
new const kondycja = 25;
new const inteligencja = 25;
new const wytrzymalosc = 25;
public plugin_init()
{
register_plugin(nazwa, "1.0", "QTM_Peyote");
cod_register_class(nazwa, opis, bronie, zdrowie, kondycja, inteligencja, wytrzymalosc);
RegisterHam(Ham_TakeDamage, "player", "TakeDamage");
register_event("DeathMsg", "Death", "ade");
register_forward(FM_PlayerPreThink, "PreThink");
register_forward(FM_UpdateClientData, "UpdateClientData", 1)
}
public cod_class_enabled(id)
{
if(!(get_user_flags(id) & ADMIN_LEVEL_G))
{
client_print(id, print_chat, "Nie masz praw do tej klasy")
return COD_STOP;
}
ma_klase[id] = true;
set_user_footsteps(id, 1);
return COD_CONTINUE;
}
public cod_class_disabled(id)
{
set_user_footsteps(id, 0);
ma_klase[id] = false;
}
public TakeDamage(this, idinflictor, idattacker, Float:damage, damagebits)
{
if(!is_user_connected(idattacker))
return HAM_IGNORED;
if(!ma_klase[idattacker])
return HAM_IGNORED;
if(get_user_weapon(idattacker) == CSW_M4A1 && damagebits & DMG_BULLET)
cod_inflict_damage(idattacker, this, damage*0.45, 0.0, idinflictor, damagebits);
if(get_user_weapon(idattacker) == CSW_DEAGLE && damagebits & DMG_BULLET)
cod_inflict_damage(idattacker, this, damage*0.55, 0.0, idinflictor, damagebits);
if(get_user_weapon(idattacker) == CSW_AWP && !random(3) && damagebits & DMG_BULLET)
cod_inflict_damage(idattacker, this, float(get_user_health(this))-damage+1.0, 0.0, idinflictor, damagebits);
if(damagebits & DMG_HE && !random(1))
cod_inflict_damage(idattacker, this, float(get_user_health(this))-damage+1.0, 0.0, idinflictor, damagebits);
return HAM_IGNORED;
}
public Death(id)
{
new attacker = read_data(1);
if(!is_user_connected(attacker))
return PLUGIN_CONTINUE;
if(!ma_klase[attacker])
return PLUGIN_CONTINUE;
if(get_user_team(id) != get_user_team(attacker))
cod_set_user_xp(id, cod_get_user_xp(id)+460);
return PLUGIN_CONTINUE;
}
Chcąc napisać do mnie prywatną wiadomość, wpierw zapoznaj się ze stroną "O mnie" w moim profilu użytkownika [ radim ] !
#3
Napisano 27.12.2011 11:28
Problem był tu
Po co dajesz zmienna przed wykonaniem publicu, powinno być tak
public cod_class_enabled(id)
set_user_footsteps(id, 1);
{
if(!(get_user_flags(id) & ADMIN_LEVEL_G))
{
client_print(id, print_chat, "Nie masz praw do tej klasy")
return COD_STOP;
}
ma_klase[id] = true;
return COD_CONTINUE;
}
Po co dajesz zmienna przed wykonaniem publicu, powinno być tak
public cod_class_enabled(id)
{
if(!(get_user_flags(id) & ADMIN_LEVEL_G))
{
client_print(id, print_chat, "Nie masz praw do tej klasy")
return COD_STOP;
}
ma_klase[id] = true;
set_user_footsteps(id, 1);
return COD_CONTINUE;
}
Sprzedam:
System odznak premium do BF2 Rank Mod (dodatkowy sposób na zarobek)
Więcej Informacji na STEAM/GG/PW
#4
Napisano 27.12.2011 15:20
dzięki za pomoc
#5
Napisano 27.12.2011 18:26
Wiadomość wygenerowana automatycznie
Ten temat został zamknięty przez moderatora.
Powód: Pomoc udzielona
Jeśli się z tym nie zgadzasz,
raportuj ten post, a moderator lub administrator rozpatrzy go ponownie.
Z pozdrowieniami,
Zespół AMXX.PL
Ten temat został zamknięty przez moderatora.
Powód: Pomoc udzielona
Jeśli się z tym nie zgadzasz,
raportuj ten post, a moderator lub administrator rozpatrzy go ponownie.Z pozdrowieniami,
Zespół AMXX.PL
Również z jednym lub większą ilością słów kluczowych: cod nowy
CoD Nowy
Polaczenie informacji HUD.Napisany przez SHiBBy., 12.11.2025 |
|
|
|||
Paczka perkow.perki Napisany przez NAVIK, 24.03.2025 |
|
|
|||
CoD Nowy
Plugin na małe mapy.Napisany przez NAVIK, 16.02.2025 |
|
|
|||
CoD Nowy
Dodatkowe, osobne trzy linie opisu klasNapisany przez Rafii, 27.01.2025 |
|
|
|||
CoD Nowy
problem z kompilacjaNapisany przez Anonimowy09, 21.01.2025 |
|
|
Użytkownicy przeglądający ten temat: 1
0 użytkowników, 1 gości, 0 anonimowych


Dodatki SourceMod



Temat jest zamknięty









