Problem z kompilacja klasy powstaniec
komandos 27.05.2011
Witajcie
Mam problem z klasa powstaniec;/ przy kompilacji wyskakują błędy
Jeśli ktoś ja naprawi proszę o napisanie co było źle, oczywiście za pomoc daje +
Mam problem z klasa powstaniec;/ przy kompilacji wyskakują błędy
Welcome to the AMX Mod X 1.8.1-300 Compiler. Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team codclass_powstaniec.sma(28) : error 017: undefined symbol "g_msg_screenfade" codclass_powstaniec.sma(61) : error 029: invalid expression, assumed zero codclass_powstaniec.sma(61) : error 029: invalid expression, assumed zero codclass_powstaniec.sma(61) : warning 215: expression has no effect codclass_powstaniec.sma(61) : error 001: expected token: ";", but found "]" codclass_powstaniec.sma(61) : fatal error 107: too many error messages on one line Compilation aborted. 5 Errors.
Jeśli ktoś ja naprawi proszę o napisanie co było źle, oczywiście za pomoc daje +
/* Plugin generated by AMXX-Studio */ #include <amxmodx> #include <codmod> #include <fakemeta> #include <colorchat> new bool:ma_klase[33]; new const nazwa[] = "Powstaniec"; new const opis[] = "Posiada ogranicznik rozrzutu i 1/10 na oslepienie wroga"; new const bronie = 1<<CSW_GALIL; new const zdrowie = -90; new const kondycja = 10; new const inteligencja = 0; new const wytrzymalosc = 0; 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("Damage", "Damage", "b", "2!=0"); g_msg_screenfade = get_user_msgid("ScreenFade"); } public cod_class_enabled(id) { ColorChat(id, GREEN, "Klasa %s zostala stworzona przez KaraTornia.pl", nazwa); ma_klase[id] = true; } public cod_class_disabled(id) { ma_klase[id] = false; } public CmdStart(id, uc_handle) { if(ma_klase[id] && get_uc(uc_handle, UC_Buttons) & IN_ATTACK) { new Float:punchangle[3] pev(id, pev_punchangle, punchangle) for(new i=0; i<3;i++) punchangle[i]*=0.9; set_pev(id, pev_punchangle, punchangle) } } public Damage(id) { new idattacker = get_user_attacker(id); if(!is_user_connected(idattacker) || get_user_team(id) == get_user_team(idattacker)) return PLUGIN_CONTINUE; if(ma_klase[idattacker] && random_num(1,10[idattacker]) == 1) Display_Fade(id, 1<<14, 1<<14 ,1<<16, 0, 255, 0, 230); return PLUGIN_CONTINUE; } stock Display_Fade(id,duration,holdtime,fadetype,red,green,blue,alpha) { message_begin( MSG_ONE, g_msg_screenfade,{0,0,0},id ); write_short( duration ); write_short( holdtime ); write_short( fadetype ); write_byte ( red ); write_byte ( green ); write_byte ( blue ); write_byte ( alpha ); message_end(); }
Abes Mapper
28.05.2011
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <codmod>
#include <fakemeta>
#include <colorchat>
new bool:ma_klase[33];
new g_msg_screenfade;
new const nazwa[] = "Powstaniec";
new const opis[] = "Posiada ogranicznik rozrzutu i 1/10 na oslepienie wroga";
new const bronie = 1<<CSW_GALIL;
new const zdrowie = -90;
new const kondycja = 10;
new const inteligencja = 0;
new const wytrzymalosc = 0;
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("Damage", "Damage", "b", "2!=0");
g_msg_screenfade = get_user_msgid("ScreenFade");
}
public cod_class_enabled(id)
{
ColorChat(id, GREEN, "Klasa %s zostala stworzona przez KaraTornia.pl", nazwa);
ma_klase[id] = true;
}
public cod_class_disabled(id)
{
ma_klase[id] = false;
}
public CmdStart(id, uc_handle)
{
if(ma_klase[id] && get_uc(uc_handle, UC_Buttons) & IN_ATTACK)
{
new Float:punchangle[3]
pev(id, pev_punchangle, punchangle)
for(new i=0; i<3;i++)
punchangle[i]*=0.9;
set_pev(id, pev_punchangle, punchangle)
}
}
public Damage(id)
{
new idattacker = get_user_attacker(id);
if(!is_user_connected(idattacker) || get_user_team(id) == get_user_team(idattacker))
return PLUGIN_CONTINUE;
if(ma_klase[idattacker] && random_num(1, 10) == 1)
Display_Fade(id, 1<<14, 1<<14 ,1<<16, 0, 255, 0, 230);
return PLUGIN_CONTINUE;
}
stock Display_Fade(id,duration,holdtime,fadetype,red,green,blue,alpha)
{
message_begin( MSG_ONE, g_msg_screenfade,{0,0,0},id );
write_short( duration );
write_short( holdtime );
write_short( fadetype );
write_byte ( red );
write_byte ( green );
write_byte ( blue );
write_byte ( alpha );
message_end();
}