05-01-2011, 23:34
Hello
I was bored this morning and decided to try with these kind of weapons, this is very simple but nice,
Add this if you dont have them:
I was bored this morning and decided to try with these kind of weapons, this is very simple but nice,
Code:
Flare()
{
while(1)
{
self giveWeapon("flare_mp",0,true);
wait 0.5;
self switchToWeapon("flare_mp",0,true);
wait 0.1;
self waittill( "weapon_fired" );
if ( self getCurrentWeapon() == "flare_mp" )
{
FX = loadfx( "misc/flare_ambient_green" );
MagicBullet( "ac130_25mm_mp", self getTagOrigin("tag_eye"), self GetCursorPos(), self );
f1 = SpawnFX(FX, self GetCursorPos());
f2 = SpawnFX(FX, self GetCursorPos()+(0,-50,20));
f3 = SpawnFX(FX, self GetCursorPos()+(0,50,10));
f4 = SpawnFX(FX, self GetCursorPos()+(50,0,-20));
f5 = SpawnFX(FX, self GetCursorPos()+(-50,0,-10));
f6 = SpawnFX(FX, self GetCursorPos()+(0,0,15));
TriggerFX(f1);
TriggerFX(f2);
TriggerFX(f3);
TriggerFX(f4);
TriggerFX(f5);
TriggerFX(f6);
wait 4;
f1 delete();
f2 delete();
f3 delete();
f4 delete();
f5 delete();
f6 delete();
}
wait 0.1;
}
}
Add this if you dont have them:
Code:
getCursorPos()
{
forward = self getTagOrigin("j_head");
end = self thread vector_scal(anglestoforward(self getPlayerAngles()),1000000);
Crosshair = BulletTrace( forward, end, 0, self )[ "position" ];
return Crosshair;
}
vector_scal(vec, scale)
{
vec = (vec[0] * scale, vec[1] * scale, vec[2] * scale);
return vec;
}