Witam
Mam taki kod ktory wywoluje sie po wyrzuceniu flasha (strzale z bazooki)
#include <amxmodx> #include <hamsandwich> public plugin_init() { RegisterHam(Ham_Weapon_PrimaryAttack, "weapon_flashbang", "rpg_pre"); } public rpg_pre(weapon) { if(!is_valid_ent(weapon)) return PLUGIN_CONTINUE; new id = entity_get_edict(weapon, EV_ENT_owner); if(jakas_zmienna) { new ent; new Float:where[3]; message_begin(MSG_ONE, get_user_msgid("ScreenShake"), {0, 0, 0}, id); write_short(255<<14); write_short(1<<14); write_short(255<<14); message_end(); ent = create_entity("info_target"); set_pev(ent, pev_classname, "rpg_missile"); set_pev(ent, pev_solid, SOLID_TRIGGER); set_pev(ent, pev_movetype, MOVETYPE_BOUNCE); entity_set_model(ent, "models/rpgrocket.mdl"); pev(id, pev_origin, where); where[2] += 50.0; where[0] += random_float(-20.0, 20.0); where[1] += random_float(-20.0, 20.0); entity_set_origin(ent, where); entity_get_vector(id, EV_VEC_angles, where); entity_set_vector(ent, EV_VEC_angles, where); velocity_by_aim(id, 700, where); entity_set_edict(ent, EV_ENT_owner, id); entity_set_vector(ent, EV_VEC_velocity, where); message_begin(0, 23); write_byte(TE_BEAMFOLLOW); write_short(ent); write_short(m_iTrail); write_byte(10); write_byte(8); write_byte(130); write_byte(130) ; write_byte(130); write_byte(196); message_end(); emit_sound(id, CHAN_WEAPON, "sound/1.wav", 1.0, ATTN_NORM, 0, PITCH_NORM); emit_sound(ent, CHAN_WEAPON, "sound/2.wav", 1.0, ATTN_NORM, 0, PITCH_NORM); RegisterHamFromEntity(Ham_Think, ent, "fw_rocket_think"); set_pev(ent, pev_nextthink, get_gametime() + 0.25); set_pdata_float(weapon , 46 , 2.5, 4); set_user_weaponanim(id, 2); return HAM_SUPERCEDE; } return HAM_IGNORED; }PS: jest to tylko funkcja ktora wystrzela rakietke
Wszystko byloby ok ale gdy korzystam z pilki (by cypis) to przyciaga ja do sciany
zaobserwowalem ze dzieje sie to zaraz po wystrzeleniu rakietki
proszę o pomoc
Użytkownik KillerBee edytował ten post 08.10.2013 04:05