Quote:
Originally Posted by alexip121093
Just like my movable machine gun plugin that you can carry the gun
Anyway good plugin , another plugin using the info_particle_target
Here are some ideas.
Add a cvar to control the attack range and the angle of detection. Also add sone ammo types eg. Fire , explosive , heal , freeze,knockback
|
Thank you for your guidance.
The beginning of the idea is create a weapon auto attack inftects, the weapon is on your shoulder, like predators in movie, but I find no appropriate model to use, and my hammar tool do not work.
Attack range and damage type are written directly in code , not yet make convars.
Another question to ask, the code below do not work in l4d1, the bullet track start from pos but not end with endpos, "info_particle_target" even do not exsit.
Code:
ShowTrack( Float:pos[3], Float:endpos[3] )
{
decl String:temp[32];
new target =0;
if(L4D2Version)target=CreateEntityByName("info_particle_target");
else target=CreateEntityByName("info_target");
Format(temp, 32, "cptarget%d", target);
DispatchKeyValue(target, "targetname", temp);
TeleportEntity(target, endpos, NULL_VECTOR, NULL_VECTOR);
ActivateEntity(target);
new particle = CreateEntityByName("info_particle_system");
if(L4D2Version) DispatchKeyValue(particle, "effect_name", PARTICLE_WEAPON_TRACER2);
else DispatchKeyValue(particle, "effect_name", PARTICLE_WEAPON_TRACER);
DispatchKeyValue(particle, "cpoint1", temp);
DispatchSpawn(particle);
ActivateEntity(particle);
TeleportEntity(particle, pos, NULL_VECTOR, NULL_VECTOR);
AcceptEntityInput(particle, "start");
CreateTimer(0.01, DeleteParticletargets, target, TIMER_FLAG_NO_MAPCHANGE);
CreateTimer(0.01, DeleteParticles, particle, TIMER_FLAG_NO_MAPCHANGE);
}