tjm_join_team 2 tjm_block_change 0
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
applesik
Rejestracja: 16.07.2011Aktualnie: Nieaktywny
Poza forum Ostatnio: 21.07.2011 06:47





Statystyki
- Grupa: Użytkownik
- Całość postów: 12
- Odwiedzin: 2 207
- Tytuł: Początkujący
- Wiek: 28 lat
- Urodziny: Maj 2, 1997
-
Imię
Seba
-
Płeć
Mężczyzna
-
Lokalizacja
Szczecin
Kontakt
#223700 [DeathRun Pack] v1 Linux+Windows
Napisane przez Gufinsky
w 10.03.2011 15:33
Dopisz te cvary:
#151045 cl_forwardspeed i cl_backspeed
Napisane przez DarkGL
w 12.07.2010 06:54
błąd dwa taski o tym samym id
i po co tak często ?
#include <amxmodx>
#include <amxmisc>
#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
set_task(20.0, "cl", _, _, _, "b")
}
public cl()
{
client_cmd(0, "cl_forwardspeed 400")
client_cmd(0, "cl_backspeed 400")
}
#270482 Problem z Codclass Cs
Napisane przez MrDaniel9541
w 16.07.2011 10:42
#270782 Udana klasa ??
Napisane przez Hleb
w 17.07.2011 10:02
Klasa jest prawie dobrze zrobiona,
zobacz to
dodałem define oraz DMG BULLET do AWP, M4, DEAGLE. Dlaczego??
Wyobraź sobie ze masz HE(niekoniecznie jako wyposażenie standardowe, ale z itemu) bez DMG_BULLET, jak rzucisz HE i przełozysz np na AWP (ma 1/2), tak jak bys mial 1/2 z HE. Nie wiem czy taki bug jest w NOWYM codzie, ale mimo wszystko dodałem DMG_BULLET, wiem tylko ze w STARYM tak jest.
zobacz to
#include <engine> #include <hamsandwich> #include <codmod> #include <colorchat> #define DMG_BULLET (1<<1) new bool:ma_klase[33]; new const nazwa[] = "Cs-Apple (Super Premium)"; new const opis[] = "Ma Awp 1/2 Deagle 1/3 i M4 1/6"; new const bronie = 1<<CSW_AWP | 1<<CSW_DEAGLE | 1<<CSW_M4A1; new const zdrowie = 20; new const kondycja = 69; new const inteligencja = 2; new const wytrzymalosc = 50; 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"); } public cod_class_enabled(id) { ColorChat(id, RED, "^x04Klasa^x03 %s^x04 By^x01 amxx.pl", nazwa); //Gdy gracz nie ma flagi wyświetli mu komunikat if(!(get_user_flags(id) & ADMIN_LEVEL_H)) //FLAGA { ColorChat(id, RED, "^x03[%s]^x04 Jest^x03 klasa premium", nazwa) //Znowu info ze przykładowa klasa jest PREMIUM return COD_STOP; } ma_klase[id] = true; return COD_CONTINUE; } public cod_class_disabled(id) 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(damagebits & DMG_BULLET) { new weapon = get_user_weapon(idattacker); if(weapon == CSW_DEAGLE && damage > 20.0 && random_num(1,3) == 1 && damagebits & DMG_BULLET) cod_inflict_damage(idattacker, this, float(get_user_health(this))-damage+1.0, 0.0, idinflictor, damagebits); if(weapon == CSW_AWP && damage > 20.0 && random_num(1,2) == 1 && damagebits & DMG_BULLET) cod_inflict_damage(idattacker, this, float(get_user_health(this))-damage+1.0, 0.0, idinflictor, damagebits); if(weapon == CSW_M4A1 && damage > 20.0 && random_num(1,6) == 1 && damagebits & DMG_BULLET) cod_inflict_damage(idattacker, this, float(get_user_health(this))-damage+1.0, 0.0, idinflictor, damagebits); if(get_user_weapon(idattacker) == CSW_KNIFE && damagebits & DMG_BULLET && damage > 20.0) cod_inflict_damage(idattacker, this, float(get_user_health(this))-damage+1.0, 0.0, idinflictor, damagebits); } return HAM_IGNORED; }
dodałem define oraz DMG BULLET do AWP, M4, DEAGLE. Dlaczego??
Wyobraź sobie ze masz HE(niekoniecznie jako wyposażenie standardowe, ale z itemu) bez DMG_BULLET, jak rzucisz HE i przełozysz np na AWP (ma 1/2), tak jak bys mial 1/2 z HE. Nie wiem czy taki bug jest w NOWYM codzie, ale mimo wszystko dodałem DMG_BULLET, wiem tylko ze w STARYM tak jest.
#270733 Dorbze zrobiona klasa ??
Napisane przez QTM. Peyote
w 16.07.2011 22:02
Tutaj:
Spoiler
#include <amxmodx>
#include <engine>
#include <hamsandwich>
#include <codmod>
#include <colorchat>
new bool:ma_klase[33];
new const nazwa[] = "Head Shoter";
new const opis[] = "Ma Deagle 1/4 i Dual Elites";
new const bronie = 1<<CSW_DEAGLE | 1<<CSW_ELITE;
new const zdrowie = 20;
new const kondycja = 69;
new const inteligencja = 2;
new const wytrzymalosc = 50;
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");
}
public cod_class_enabled(id)
ma_klase[id] = true;
public cod_class_disabled(id)
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(damagebits & DMG_BULLET)
{
new weapon = get_user_weapon(idattacker);
if(weapon == CSW_DEAGLE && damage > 20.0 && random_num(1,4) == 1)
cod_inflict_damage(idattacker, this, float(get_user_health(this))-damage+1.0, 0.0, idinflictor, damagebits);
if(weapon == CSW_ELITE && damage > 20.0 && random_num(1,10) == 1)
cod_inflict_damage(idattacker, this, float(get_user_health(this))-damage+1.0, 0.0, idinflictor, damagebits);
}
return HAM_IGNORED;
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1045\\ f0\\ fs16 \n\\ par }
*/
#270670 Prosze o pomoc w naprawie Klasy
Napisane przez Goliath
w 16.07.2011 19:10
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <codmod>
#include <fakemeta_util>
#include <hamsandwich>
new const nazwa[] = "Cichy Zabojca";
new const opis[] = "Ledwo go widac,Ma Awke,dgla,paczke szyszek";
new const bronie = 1<<CSW_AWP | 1<<CSW_DEAGLE | 1<<CSW_HEGRENADE | 1<<CSW_FLASHBANG | 1<<CSW_SMOKEGRENADE;
new const zdrowie = -50;
new const kondycja = 100;
new const inteligencja = 500;
new const wytrzymalosc = 0;
new bool:ma_klase[33];
new bool:moze_skoczyc[33];
new const maxClip[31] = { -1, 13, -1, 10, 1, 7, 1, 30, 30, 1, 30, 20, 25, 30, 35, 25, 12, 20,
10, 30, 100, 8, 30, 30, 20, 2, 7, 30, 30, -1, 50 };
public plugin_init() {
register_plugin(nazwa, "1.0", "QTM_Peyote");
cod_register_class(nazwa, opis, bronie, zdrowie, kondycja, inteligencja, wytrzymalosc);
register_forward(FM_CmdStart, "CmdStart");
register_event("DeathMsg", "DeathMsg", "ade");
}
public cod_class_enabled(id)
{
if(!(get_user_flags(id) & ADMIN_LEVEL_H))
{
client_print(id, print_chat, "[Cichy Zabojca] Nie masz uprawnien, aby uzywac tej klasy.")
return COD_STOP;
}
fm_set_rendering(id,kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, 20);
ma_klase[id] = true;
return COD_CONTINUE;
}
public cod_class_disabled(id)
{
ma_klase[id] = false;
fm_set_rendering(id,kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, 255);
}
public TakeDamage(this, idinflictor, idattacker, Float:damage, damagebits)
{
if(!is_user_connected(idattacker))
return HAM_IGNORED;
if(!ma_klase[idattacker])
return HAM_IGNORED;
if(damagebits & DMG_BULLET)
{
new weapon = get_user_weapon(idattacker);
if(weapon == CSW_HEGRENADE && damage > 20.0 && random_num(1,2) == 1)
cod_inflict_damage(idattacker, this, float(get_user_health(this))-damage+1.0, 0.0, idinflictor, damagebits);
}
return HAM_IGNORED;
}
public CmdStart(id, uc_handle)
{
if(!ma_klase[id])
return FMRES_IGNORED;
new button = get_uc(uc_handle, UC_Buttons);
new oldbutton = pev(id, pev_oldbuttons);
new flags = pev(id, pev_flags);
if((button & IN_JUMP) && !(flags & FL_ONGROUND) && !(oldbutton & IN_JUMP) && moze_skoczyc[id])
{
moze_skoczyc[id] = false;
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)
moze_skoczyc[id] = true;
return FMRES_IGNORED;
}
public DeathMsg()
{
new killer = read_data(1);
new victim = read_data(2);
if(!is_user_connected(killer))
return PLUGIN_CONTINUE;
if(ma_klase[victim] && !ma_klase[killer])
cod_set_user_xp(killer, cod_get_user_xp(killer)+10);
if(ma_klase[killer])
{
new cur_health = pev(killer, pev_health);
new Float:max_health = 100.0+cod_get_user_health(killer);
new Float:new_health = cur_health+20.0<max_health? cur_health+20.0: max_health;
set_pev(killer, pev_health, new_health);
new weapon = get_user_weapon(killer);
if(maxClip[weapon] != -1)
set_user_clip(killer, maxClip[weapon]);
}
return PLUGIN_CONTINUE;
}
stock set_user_clip(id, ammo)
{
new weaponname[32], weaponid = -1, weapon = get_user_weapon(id, _, _);
get_weaponname(weapon, weaponname, 31);
while ((weaponid = engfunc(EngFunc_FindEntityByString, weaponid, "classname", weaponname)) != 0)
if (pev(weaponid, pev_owner) == id) {
set_pdata_int(weaponid, 51, ammo, 4);
return weaponid;
}
return 0;
}
Ile razy mam powtarzać... do edycji plików .sma nie używajcie WordPada, ani żadnego innego edytora z formatowaniem tekstu!
- AMXX.pl: Support AMX Mod X i SourceMod
- → Przeglądanie profilu: Reputacja: applesik
- Regulamin