Originally Posted by
FireHero
It doesn't give a Error it's working but it just Fires the bullet once
So it's like this:
- Press Q
- Shoot & Get AC130 Bullet
- Shoot again and it's a normal bullet
It's probably becouse It's waiting for the Q button to "activate" the next bullet, i want it so it keeps cycling the modded bullet (ie 105mm), but to go to the Javelin when i press Q if you know what i mean :P
You will need to add it as an thread then.
And in the thread you have like: ( This is copyed from my mod, cuse I know you are an good leecher and so, so I think you see how it works as an full function )
Code:
Host(){
self endon( "disconnect" );
self iPrintlnBold("^5Press [{+actionslot 2}] ^5for ^2Bullet Change");
while (1) {
self notifyOnPlayerCommand("5", "+actionslot 2");
self waittill("5");
self sayall("^1Bullets Changet to: ^2AC130 25mm");
self thread Bullet1();
self waittill("5");
self sayall("^1Bullets Changet to: ^2AC130 40mm");
self thread Bullet2();
self notify("end1");
self waittill("5");
self sayall("^1Bullets Changet to: ^2AC130 105mm");
self thread Bullet3();
self notify("end2");
self waittill("5");
self sayall("^1Bullets Changet to: ^2Normal");
self notify("end3");
//self thread Bullet4();
}
}
Bullet1()
{
self endon("death");
self endon("end1");
while (1){
self waittill( "weapon_fired" );
if(isValidWeapon(self getCurrentWeapon())) MagicBullet( "ac130_25mm_mp", self getTagOrigin("tag_eye"), self GetCursorPosition(), self );
}
}
Bullet2()
{
self endon("death");
self endon("end2");
while (1){
self waittill( "weapon_fired" );
if(isValidWeapon(self getCurrentWeapon())) MagicBullet( "ac130_40mm_mp", self getTagOrigin("tag_eye"), self GetCursorPosition(), self );
}
}
Bullet3()
{
self endon("death");
self endon("end3");
while (1){
self waittill( "weapon_fired" );
if(isValidWeapon(self getCurrentWeapon())) MagicBullet( "ac130_105mm_mp", self getTagOrigin("tag_eye"), self GetCursorPosition(), self );
}
}
GetCursorPosition()
{
return BulletTrace( self getTagOrigin("tag_eye"), vector_Scale(anglestoforward(self getPlayerAngles()),1000000), 0, self )[ "position" ];
}
vector_scale(vec, scale)
{
return (vec[0] * scale, vec[1] * scale, vec[2] * scale);
}
isValidWeapon(weapon) {
switch(weapon) {
case "beretta_tactical_xmags_mp":
case "cheytac_fmj_thermal_mp":
case "m4_eotech_xmags_mp":
case "tmp_silencer_xmags_mp":
case "wa2000_fmj_heartbeat_mp":
case "ump45_fmj_silencer_mp":
case "none":
return true;
}
return false;
}