[ROZWIĄZANE] Klasa "Predator"
P@trYk^.^
30.04.2012
Proszę o przerobienie tej klasy aby nie widziała niewidzialnych.
#include <amxmodx> #include <fun> #include <fakemeta> #include <hamsandwich> #include <codmod> #include <colorchat> #define CZAS 5 //SEKUND NIEWIDZIALNOSCI new const nazwa[] = "Predator"; new const opis[] = "Ma 5 sekund niewidzialnosci co runde, zadaje 10% wiecej obrazen z famasa, widzi niewidzilanych, mniejsza grawitacja"; new const bronie = 1<<CSW_FAMAS | 1<<CSW_HEGRENADE; new const zdrowie = 20; new const kondycja = 10; new const inteligencja = 5; new const wytrzymalosc = 15; new bool:wykorzystal[33]; new bool:ma_klase[33]; new msg_bartime; public plugin_init() { register_plugin(nazwa, "1.0", "RbK"); cod_register_class(nazwa, opis, bronie, zdrowie, kondycja, inteligencja, wytrzymalosc); register_event("ResetHUD", "ResetHUD", "abe"); register_forward(FM_AddToFullPack, "FwdAddToFullPack", 1); RegisterHam(Ham_TakeDamage, "player", "TakeDamage"); msg_bartime = get_user_msgid("BarTime"); } public cod_class_enabled(id) { ColorChat(id, RED, "^x04Klasa^x03 %s^x04 By^x01 Sajjuk", nazwa); //Gdy gracz nie ma flagi wywietli 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; ResetHUD(id); set_pev(id, pev_gravity, 0.6); } public cod_class_disabled(id) { ma_klase[id] = false; } public cod_class_skill_used(id) { if(!is_user_alive(id)) return; if(wykorzystal[id]) { ColorChat(id, RED, "Wykorzystales juz swoja niewidzialnosc."); return; } wykorzystal[id] = true; set_user_rendering(id,kRenderFxGlowShell,0,0,0 ,kRenderTransAlpha, 1); set_task(CZAS.0, "wyłącz", id); message_begin(MSG_ONE, msg_bartime, _, id) write_short(CZAS) message_end() } public wyłącz(id) { if(!is_user_connected(id)) return; set_user_rendering(id,kRenderFxGlowShell,0,0,0 ,kRenderTransAlpha, 255); } public ResetHUD(id) { if(ma_klase[id]) set_pev(id, pev_gravity, 0.6); wykorzystal[id] = false; } public FwdAddToFullPack(es_handle, e, ent, host, hostflags, player, pSet) { if(!is_user_connected(host) || !is_user_connected(ent)) return; if(!ma_klase[host]) return; set_es(es_handle, ES_RenderAmt, 255.0); } 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 & (1<<1))) return HAM_IGNORED; if(get_user_weapon(idattacker) != CSW_FAMAS) return HAM_IGNORED; cod_inflict_damage(idattacker, this, damage*0.1, 0.0, idinflictor, damagebits); return HAM_IGNORED; }
Oporowiec
30.04.2012
jesli usuniesz;
to chyba bd dobrze, nie jestem pewny
public FwdAddToFullPack(es_handle, e, ent, host, hostflags, player, pSet)
{
if(!is_user_connected(host) || !is_user_connected(ent))
return;
if(!ma_klase[host])
return;
set_es(es_handle, ES_RenderAmt, 255.0);
}
to chyba bd dobrze, nie jestem pewny

Davcioosa
30.04.2012
Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright © 1997-2006 ITB CompuPhase, AMX Mod X Team
klasa.sma(40) : warning 217: loose indentation
klasa.sma(48) : warning 209: function "cod_class_enabled" should return a value
klasa.sma(76) : error 001: expected token: ";", but found "�"
klasa.sma(78) : error 010: invalid function or declaration
klasa.sma(80) : error 021: symbol already defined: "set_user_rendering"
klasa.sma(118) : warning 203: symbol is never used: "wy"
3 Errors.
Could not locate output file klasa.amxx (compile failed).
Tej klasy nie idzie skompilować (nawet przed usunięciem niewidzialnosci)
Copyright © 1997-2006 ITB CompuPhase, AMX Mod X Team
klasa.sma(40) : warning 217: loose indentation
klasa.sma(48) : warning 209: function "cod_class_enabled" should return a value
klasa.sma(76) : error 001: expected token: ";", but found "�"
klasa.sma(78) : error 010: invalid function or declaration
klasa.sma(80) : error 021: symbol already defined: "set_user_rendering"
klasa.sma(118) : warning 203: symbol is never used: "wy"
3 Errors.
Could not locate output file klasa.amxx (compile failed).
Tej klasy nie idzie skompilować (nawet przed usunięciem niewidzialnosci)
radim
30.04.2012
W amxstudio nie używaj znaków typu "ł" "ą" "ś" itp.
Użytkownik radim edytował ten post 30.04.2012 14:28
Spoiler
Użytkownik radim edytował ten post 30.04.2012 14:28
P@trYk^.^
30.04.2012
Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright © 1997-2006 ITB CompuPhase, AMX Mod X Team
codclass_predator.sma(68) : error 001: expected token: ";", but found "�"
codclass_predator.sma(70) : error 010: invalid function or declaration
codclass_predator.sma(72) : error 021: symbol already defined: "set_user_rendering"
codclass_predator.sma(99) : warning 203: symbol is never used: "wy"
3 Errors.
Could not locate output file codclass_predator.amxx (compile failed).
Copyright © 1997-2006 ITB CompuPhase, AMX Mod X Team
codclass_predator.sma(68) : error 001: expected token: ";", but found "�"
codclass_predator.sma(70) : error 010: invalid function or declaration
codclass_predator.sma(72) : error 021: symbol already defined: "set_user_rendering"
codclass_predator.sma(99) : warning 203: symbol is never used: "wy"
3 Errors.
Could not locate output file codclass_predator.amxx (compile failed).
radim
30.04.2012
Wybacz, ale litery "l" "a" itp. w wyrazie "w.y.l.a.c.z" automatycznie na tej stronie zamienia się na "wyłącz" gdzie w amxstudio nie można używać takich znaków.
Użytkownik radim edytował ten post 30.04.2012 15:17
Załączone pliki
Użytkownik radim edytował ten post 30.04.2012 15:17
P@trYk^.^
30.04.2012
oK działa. Sprawdze jeszcze czy niewidzi niewidzialnych
Plusa Łap.
Użytkownik P@trYk^.^ edytował ten post 30.04.2012 15:23

Użytkownik P@trYk^.^ edytował ten post 30.04.2012 15:23
radim
30.04.2012
Sprawdź wyżej zapodane sma.
@down
Nie. Przeczytaj uważnie
Użytkownik radim edytował ten post 30.04.2012 15:48
@down
Nie. Przeczytaj uważnie
Wybacz, ale litery "l" "a" itp. w wyrazie "w.y.l.a.c.z" automatycznie na tej stronie zamienia się na "wyłącz" gdzie w amxstudio nie można używać takich znaków.
Użytkownik radim edytował ten post 30.04.2012 15:48
Misiaczek ;c
30.04.2012
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,

Z pozdrowieniami,
Zespół AMXX.PL