
yes im lazy lmao. but anyway this function is not worth wasting my time so i just stoped, ill wait till it gets released.
yes im lazy lmao. but anyway this function is not worth wasting my time so i just stoped, ill wait till it gets released.

myMagicBullet(pos, dir)
{
damage = 20;
if (getdvar("scr_copter_damage") != "")
damage = getdvarint("scr_copter_damage");
// for now just shoot from origin
trace = bullettrace(pos, pos + vecscale(dir, 10000), true, undefined);
if (isdefined(trace["entity"]) && isplayer(trace["entity"]) && isalive(trace["entity"])) {
// hurt entity shot at
trace["entity"] thread [[level.callbackPlayerDamage]](
self, // eInflictor The entity that causes the damage.(e.g. a turret)
self, // eAttacker The entity that is attacking.
damage, // iDamage Integer specifying the amount of damage done
0, // iDFlags Integer specifying flags that are to be applied to the damage
"MOD_RIFLE_BULLET", // sMeansOfDeath Integer specifying the method of death
"copter", // sWeapon The weapon number of the weapon used to inflict the damage
self.origin, // vPoint The point the damage is from?
dir, // vDir The direction of the damage
"none", // sHitLoc The location of the hit
0 // psOffsetTime The time offset for the damage
);
}
//line(pos, trace["position"], (1,1,1));
}
myMagicBullet(pos, dir)
{
damage = 20;
if (getdvar("scr_copter_damage") != "")
damage = getdvarint("scr_copter_damage");
// for now just shoot from origin
trace = bullettrace(pos, pos + vecscale(dir, 10000), true, undefined);
if (isdefined(trace["entity"]) && isplayer(trace["entity"]) && isalive(trace["entity"])) {
// hurt entity shot at
trace["entity"] thread [[level.callbackPlayerDamage]](
self, // eInflictor The entity that causes the damage.(e.g. a turret)
self, // eAttacker The entity that is attacking.
damage, // iDamage Integer specifying the amount of damage done
0, // iDFlags Integer specifying flags that are to be applied to the damage
"MOD_RIFLE_BULLET", // sMeansOfDeath Integer specifying the method of death
"copter", // sWeapon The weapon number of the weapon used to inflict the damage
self.origin, // vPoint The point the damage is from?
dir, // vDir The direction of the damage
"none", // sHitLoc The location of the hit
0 // psOffsetTime The time offset for the damage
);
}
//line(pos, trace["position"], (1,1,1));
}
Copyright © 2026, NextGenUpdate.
All Rights Reserved.