Podskakiwanie ustrzelonego przeciwnika
!cex!
24.04.2012
Wyciągnąłem kod z jednego perku do COD'a, lekko go przerobiłem pod moc do Diablo i mam pytanie czy to ma szansę trybić, bo mam lekkie wątpliwości?
if((attacker_id!=id)&&player_class[attacker] == Mag) && (weapon == CSW_P228 || weapon == CSW_ELITE || weapon == CSW_FIVESEVEN || weapon == CSW_USP || weapon == CSW_GLOCK18 || weapon == CSW_DEAGLE) && random_num(1, iRandom)==1 && this != idattacker && get_user_team(idattacker) != get_user_team(this)) { new Float:velocity[3]; velocity[0]=0.0; velocity[1]=0.0; velocity[2]=0.0; set_pev(this, pev_velocity, velocity); velocity[2] = random_float(500.0,600.0); set_pev(this, pev_velocity, velocity); set_pev(this, pev_renderfx, kRenderFxGlowShell); set_pev(this, pev_renderamt, 16); new Float:Color[3]; Color[0]=random_float(1.0, 255.0); Color[1]=random_float(1.0, 255.0); Color[2]=random_float(1.0, 255.0); set_pev(this, pev_rendercolor, Color); message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("ScreenFade"), _, this) write_short(1<<12) write_short(1<<12) write_short(1<<1); write_byte(floatround(Color[0])); write_byte(floatround(Color[1])); write_byte(floatround(Color[2])); write_byte(160); message_end(); message_begin(MSG_BROADCAST, SVC_TEMPENTITY) write_byte(TE_BEAMFOLLOW) write_short(this) write_short(g_trail) write_byte(3) write_byte(5) write_byte(floatround(Color[0])) write_byte(floatround(Color[1])) write_byte(floatround(Color[2])) write_byte(190) message_end() set_task(0.1, "NoneGlow", this, _, _, "b"); } } public NoneGlow(id) { if(pev(id, pev_flags) & FL_ONGROUND) { set_pev(id, pev_renderfx, kRenderFxNone); set_pev(id, pev_renderamt, 16); set_pev(id, pev_rendercolor, {0.0,0.0,0.0}); remove_task(id); } }
DarkBB
24.04.2012
Ja tu błędów nie widzę, ale ja się często mylę więc musisz poczekać na odpowiedzi innych użytkowników.
ogieR8
25.04.2012
A może całą funkcje ?
1. Masz iRandom zdefiniowane ?
2. attacker_id != id
3. attackerid != this
???
W takim wypadku co jest attacker_id, idattacker, id, this ? Pewnie błędy przez nieuwagę, ale daj kod całej funkcji to Ci to odpowiednio zrobię. I nie, nie bój się, że chce Twoją funkcję, bo mam podobną
1. Masz iRandom zdefiniowane ?
2. attacker_id != id
3. attackerid != this
???
W takim wypadku co jest attacker_id, idattacker, id, this ? Pewnie błędy przez nieuwagę, ale daj kod całej funkcji to Ci to odpowiednio zrobię. I nie, nie bój się, że chce Twoją funkcję, bo mam podobną