Post: [Release] Crazy Weapons Script
10-31-2010, 08:33 PM #1
OFWGKTA
Developer
(adsbygoogle = window.adsbygoogle || []).push({}); I honestly don't know why I am releasing this but I'm certain people can modify this to conduct something amazing,
Please credit if you use these scripts..
Weapons consist of:

Cod4 M40a3 w/ Sound
Cod5 Flamethrower
Cod5 Wunderwaffe
//Adding Cod5 Raygun Later
Cod7 CrossBow
Custom Teleport Gun
Even the names of the guns are changed, its a full adaptation..

    
[COLOR="Red"]giveFlamethrower()[/COLOR]
{
self thread giveFT();
wait 0.3;
self giveWeapon("striker_silencer_xmags_mp", 0);
wait 0.3;
self thread doFXbyMap(getDvar("mapname"));
}

giveFT()
{
self endon("death");
self endon("disconnect");
while(1)
{
self waittill("weapon_fired");
if(self getCurrentWeapon() == "striker_silencer_xmags_mp")
{
startB = GetCursorPos();
startA = self getTagOrigin("tag_weapon_left");
xD = distance(startA, startB);
//We will have to do a limit of range, or else error 'no free dobjs'
owner = self;
if(xD < 855)
{
pointe = roundUp(xD/55);
CX = startA[0] - startB[0];
CY = startA[1] - startB[1];
CZ = startA[2] - startB[2];

XA = CX/pointe;
YA = CY/pointe;
ZA = CZ/pointe;

RadiusDamage( startB, 300, 300, 300, owner );
for(b = pointe; b > -1; b--)
{
playFX(self.ZFX, startB + (((XA, YA, ZA) * b)) );
wait 0.01;
}
}
}
}
}

doFXbyMap(mapz)
{
self.ZFX = level.spawnGlow["enemy"];;
switch(mapz)
{
case "mp_checkpoint":
self.ZFX = level._effect[ "firelp_med_pm" ];
break;

case "mp_boneyard":
self.ZFX = level._effect[ "firelp_med_pm_nolight" ];
break;

case "mp_favela":
self.ZFX = level._effect[ "firelp_med_pm" ];
break;

case "mp_invasion":
self.ZFX = level._effect[ "firelp_med_pm" ];
break;
}
}

[COLOR="Red"]giveVUNDERVAFFLE()[/COLOR]
{
self thread giveWW();
wait 0.3;
self giveWeapon("ak47_acog_heartbeat_mp", 7, false);
wait 0.3;
self thread doFXMapz(getDvar("mapname"));
}

giveWW()
{
self endon("death");
self endon("disconnect");
while(1)
{
self waittill("weapon_fired");
if(self getCurrentWeapon() == "ak47_acog_heartbeat_mp")
{
startB = GetCursorPos();
startA = self getTagOrigin("tag_weapon_left");
xD = distance(startA, startB);
//We will have to do a limit of range, or else error 'no free dobjs'
owner = self;
if(xD < 855)
{
pointe = roundUp(xD/55);
CX = startA[0] - startB[0];
CY = startA[1] - startB[1];
CZ = startA[2] - startB[2];

XA = CX/pointe;
YA = CY/pointe;
ZA = CZ/pointe;

RadiusDamage( startB, 300, 300, 300, owner );
for(b = pointe; b > -1; b--)
{
playFX(self.ZFX, startB + (((XA, YA, ZA) * b)) );
wait 0.01;
}
}
}
}
}

doFXMapz(mapz)
{
self.ZFX = level.spawnGlow["enemy"];;
switch(mapz)
{
case "mp_underpass":
self.ZFX = level._effect[ "lightning" ];
break;
}
}

[COLOR="Red"]giveTT()[/COLOR]
{
self thread giveTELEPORTER();
wait 0.3;
self giveWeapon("beretta_silencer_tactical_mp", 0);
}

giveTELEPORTER()
{
self endon("death");
self endon("disconnect");
while(1)
{
self waittill("weapon_fired");
if(self getCurrentWeapon() == "beretta_silencer_tactical_mp")
{
self.maxhp = self.maxhealth;
self.hp = self.health;
self.maxhealth = 99999;
self.health = self.maxhealth;

playFx( level.chopper_fx["smoke"]["trail"], self.origin );
playFx( level.chopper_fx["smoke"]["trail"], self.origin );
playFx( level.chopper_fx["smoke"]["trail"], self.origin );
forward = self getTagOrigin("j_gun");
end = self thread vector_Scal(anglestoforward(self getPlayerAngles()),1000000);
location = BulletTrace( forward, end, 0, self )[ "position" ];
self SetOrigin( location );
}
}
}

[COLOR="Red"]giveCheytac()[/COLOR]
{
self endon("death");
self endon("disconnect");
while(1)
{
self waittill("weapon_fired");
if(self getCurrentWeapon() == "cheytac_fmj_xmags_mp"){
self playLocalSound( "weap_m40a3sniper_fire_plr" );
}
}
}

[COLOR="Red"]changeWeaponNames()[/COLOR]
{
self endon("death");
self endon("disconnect");
sWeapon = self getCurrentWeapon();

weaponName = self createFontString( "default", 1.7 );
weaponName setPoint( "RIGHT", "CENTER", 360, 170);
self thread DestroyOnDeath(weaponName);

csname = spawnstruct();
csname.text = game["weapons"]["UNKOWN"];

weaponName settext(csname.text);

while(1)
{
sWeapon = self getCurrentWeapon();
switch(sWeapon)
{
case "cheytac_fmj_xmags_mp":
csname.text = game["weapons"]["M40a3"];
break;

case "m4_shotgun_attach_mp":
csname.text = game["weapons"]["Flamezz"];
break;

case "ak47_acog_heartbeat_mp":
csname.text = game["weapons"]["Waffe"];
break;

case "beretta_silencer_tactical_mp":
csname.text = game["weapons"]["Teleporter"];
break;
}

weaponName settext(csname.text);
wait 0.55;
}
}

DestroyOnDeath(obj)
{
self waittill("death");
obj destroy();
}


Revamped Crossbow
As realistic as it gets..
    
[COLOR="Red"]Crossbow()[/COLOR]
{
self giveWeapon("m21_acog_fmj_mp");
self thread Weapon("m21_acog_fmj_mp"); // You need the below thread to use this. If you are not intending to use it, just remove this line
self.tips = 1;

self setWeaponAmmoStock("m21_acog_fmj_mp", 999);
beforewep = "m21_acog_fmj_mp";
self setWeaponAmmoClip(beforewep, 1);
for(;Winky Winky{
wep = self getCurrentWeapon();
clip = self getWeaponAmmoClip(wep);
if(clip > 1)
self setWeaponAmmoClip(wep, 1);
self setWeaponAmmoStock(wep, 99);
wait 0.05;}
}

[COLOR="Red"]doTips(eAttacker)[/COLOR]
{
self endon("death");
wait 0.2;
self PlayLocalSound( "javelin_clu_aquiring_lock" );
wait 0.5;
self PlayLocalSound( "javelin_clu_aquiring_lock" );
wait 0.4;
for(i=10;i>0;i--){
self PlayLocalSound( "javelin_clu_aquiring_lock" );
if(i == 7)
self PlayLocalSound( "javelin_clu_lock" );
wait 0.1;}
MagicBullet( "ac130_40mm_mp", self getTagOrigin("tag_eye")+(0, 0, 0), self.origin, eAttacker );
}
// Exploding tips
if(eAttacker.tips != "TRIP_BAWLZ"){
PlayFXOnTag( level.spawnGlow["friendly"], victim, "tag_eye" );
if(sWeapon == eAttacker getCurrentWeapon())
iDamage = 1;
victim thread doTips(eAttacker);}
// =============================================== //


You must login or register to view this content.
(adsbygoogle = window.adsbygoogle || []).push({});

The following 8 users say thank you to OFWGKTA for this useful post:

Battler624, BuC-ShoTz, EuanBlondin_x, GNDOOOR_KILLER, iMonssta, jake-thesnake, Shaarpy, Toptuning
10-31-2010, 09:31 PM #11
Cyborg Ninja
PS3 Security FtW !
Originally posted by adrian.saint View Post
I honestly don't know why I am releasing this but I'm certain people can modify this to conduct something amazing,
Please credit if you use these scripts? :love:
Weapons consist of:

Cod4 M4A0 w/ Sound
Cod5 Flamethrower
Cod5 Wunderwaffe Named VunderVaffle :pedo: ..for dramatic Effect
//Removed Cod5 Raygun
Cod7 CrossBow
Custom Teleport Gun
Even the names of the guns are changed, its a full adaptation..

    
doBlackops()
{
self endon ( "disconnect" );
self endon ( "death" );
while ( 1 ) {
self thread changeWeaponNames();
self thread giveCheytac();
self thread giveFlamethrower();
self thread giveVUNDERVAFFLE();
self thread giveTT();
self thread giveCB();
}
}

giveFlamethrower()
{
self thread giveFT();
wait 0.3;
self giveWeapon("striker_silencer_xmags_mp", 0);
wait 0.3;
self thread doFXbyMap(getDvar("mapname"));
}

giveFT()
{
self endon("death");
self endon("disconnect");
while(1)
{
self waittill("weapon_fired");
if(self getCurrentWeapon() == "striker_silencer_xmags_mp")
{
startB = GetCursorPos();
startA = self getTagOrigin("tag_weapon_left");
xD = distance(startA, startB);
//We will have to do a limit of range, or else error 'no free dobjs'
owner = self;
if(xD < 855)
{
pointe = roundUp(xD/55);
CX = startA[0] - startB[0];
CY = startA[1] - startB[1];
CZ = startA[2] - startB[2];

XA = CX/pointe;
YA = CY/pointe;
ZA = CZ/pointe;

RadiusDamage( startB, 300, 300, 300, owner );
for(b = pointe; b > -1; b--)
{
playFX(self.ZFX, startB + (((XA, YA, ZA) * b)) );
wait 0.01;
}
}
}
}
}

doFXbyMap(mapz)
{
self.ZFX = level.spawnGlow["enemy"];;
switch(mapz)
{
case "mp_checkpoint":
self.ZFX = level._effect[ "firelp_med_pm" ];
break;

case "mp_boneyard":
self.ZFX = level._effect[ "firelp_med_pm_nolight" ];
break;

case "mp_favela":
self.ZFX = level._effect[ "firelp_med_pm" ];
break;

case "mp_invasion":
self.ZFX = level._effect[ "firelp_med_pm" ];
break;
}
}

giveVUNDERVAFFLE()
{
self thread giveWW();
wait 0.3;
self giveWeapon("ak47_acog_heartbeat_mp", 7, false);
wait 0.3;
self thread doFXMapz(getDvar("mapname"));
}

giveWW()
{
self endon("death");
self endon("disconnect");
while(1)
{
self waittill("weapon_fired");
if(self getCurrentWeapon() == "ak47_acog_heartbeat_mp")
{
startB = GetCursorPos();
startA = self getTagOrigin("tag_weapon_left");
xD = distance(startA, startB);
//We will have to do a limit of range, or else error 'no free dobjs'
owner = self;
if(xD < 855)
{
pointe = roundUp(xD/55);
CX = startA[0] - startB[0];
CY = startA[1] - startB[1];
CZ = startA[2] - startB[2];

XA = CX/pointe;
YA = CY/pointe;
ZA = CZ/pointe;

RadiusDamage( startB, 300, 300, 300, owner );
for(b = pointe; b > -1; b--)
{
playFX(self.ZFX, startB + (((XA, YA, ZA) * b)) );
wait 0.01;
}
}
}
}
}

doFXMapz(mapz)
{
self.ZFX = level.spawnGlow["enemy"];;
switch(mapz)
{
case "mp_underpass":
self.ZFX = level._effect[ "lightning" ];
break;
}
}

giveTT()
{
self thread giveTELEPORTER();
wait 0.3;
self giveWeapon("beretta_silencer_tactical_mp", 0);
}

giveTELEPORTER()
{
self endon("death");
self endon("disconnect");
while(1)
{
self waittill("weapon_fired");
if(self getCurrentWeapon() == "beretta_silencer_tactical_mp")
{
self.maxhp = self.maxhealth;
self.hp = self.health;
self.maxhealth = 99999;
self.health = self.maxhealth;

playFx( level.chopper_fx["smoke"]["trail"], self.origin );
playFx( level.chopper_fx["smoke"]["trail"], self.origin );
playFx( level.chopper_fx["smoke"]["trail"], self.origin );
forward = self getTagOrigin("j_gun");
end = self thread vector_Scal(anglestoforward(self getPlayerAngles()),1000000);
location = BulletTrace( forward, end, 0, self )[ "position" ];
self SetOrigin( location );
}
}
}

giveCheytac()
{
self endon("death");
self endon("disconnect");
while(1)
{
self waittill("weapon_fired");
if(self getCurrentWeapon() == "cheytac_fmj_xmags_mp")
{
notifyData.sound = "weap_m40a3sniper_fire_plr";
notifyData.duration = 1;
}
}
}

giveCB()
{
self thread giveCROSSBOW();
wait 0.3;
self giveWeapon("m16_silencer_heartbeat_mp", 0);
}

giveCROSSBOW()
{
self endon("death");
self endon("disconnect");
while(1)
{
self waittill("weapon_fired");
if(self getCurrentWeapon() == "m16_silencer_heartbeat_mp")
self thread doArrow();
}
}

doArrow()
{
self setClientDvar("perk_weapReloadMultiplier", 0.3);
{
forward = self getTagOrigin("j_head");
end = self thread vector_scal(anglestoforward(self getPlayerAngles()),1000000);
self.Crosshair = BulletTrace( forward, end, 0, self )[ "position" ];
self.apple=spawn("script_model", self getTagOrigin("tag_weapon_right"));
self.apple setmodel("weapon_light_stick_tactical_bombsquad");
self.apple.angles = self.angles;
self.apple.owner = self.name;
self.apple thread findVictim();
self.apple moveTo(self.Crosshair, (distance(self.origin, self.Crosshair) / 10000));
self.apple.angles = self.angles;
self thread doBeep(0.3);
self.counter = 0;
}
}

findVictim()
{
while(1)
{
foreach(player in level.players)
{
if(!isAlive(player))
continue;

if(distance(self.origin, player.origin) < 75)
{
myVictim = player;
if(myVictim.name != self.owner)
self moveTo(((myVictim.origin[0],myVictim.origin[1],0)+(0,0,self.origin[2])), 0.1);
}
}
wait 0.000001;
}
}

doBeep(maxtime)
{
self.apple playSound( "ui_mp_timer_countdown" );
wait(maxtime);
self.apple playSound( "ui_mp_timer_countdown" );
wait(maxtime);
for(i = maxtime; i > 0; i-=0.1)
{
self.apple playSound( "ui_mp_timer_countdown" );
wait(i);
self.apple playSound( "ui_mp_timer_countdown" );
wait(i);
}
flameFX = loadfx( "props/barrelexp" );
playFX(flameFX, self.apple.origin);
RadiusDamage(self.apple.origin,200,200,200,self);
self.apple playsound( "detpack_explo_default" );
self.apple.dead = true;
self.apple delete();
}

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;
}

roundUp( floatVal )
{
if ( int( floatVal ) != floatVal )
return int( floatVal+1 );
else
return int( floatVal );
}

changeWeaponNames()
{
self endon("death");
self endon("disconnect");
sWeapon = self getCurrentWeapon();

weaponName = self createFontString( "default", 1.7 );
weaponName setPoint( "RIGHT", "CENTER", 360, 170);
self thread DestroyOnDeath(weaponName);

csname = spawnstruct();
csname.text = game["weapons"]["UNKOWN"];

weaponName settext(csname.text);

while(1)
{
sWeapon = self getCurrentWeapon();
switch(sWeapon)
{
case "cheytac_fmj_xmags_mp":
csname.text = game["weapons"]["M4A0"];
break;

case "m4_shotgun_attach_mp":
csname.text = game["weapons"]["FlameThrower"];
break;

case "ak47_acog_heartbeat_mp":
csname.text = game["weapons"]["VunderVaffle"];
break;

case "beretta_silencer_tactical_mp":
csname.text = game["weapons"]["Teleporter"];
break;

case "m16_silencer_heartbeat_mp":
csname.text = game["weapons"]["Crossbow"];
break;
}

weaponName settext(csname.text);
wait 0.55;
}
}

DestroyOnDeath(obj)
{
self waittill("death");
obj destroy();
}


I get a notifydata error ?

I was thinking this was an error.

    giveCheytac()
{
self endon("death");
self endon("disconnect");
while(1)
{
self waittill("weapon_fired");
if(self getCurrentWeapon() == "cheytac_fmj_xmags_mp")
{
notifyData.sound = "weap_m40a3sniper_fire_plr";
notifyData.duration = 1;
}
}
}


Scrap that wouldnt work.
10-31-2010, 09:39 PM #12
OFWGKTA
Developer
Originally posted by Skyl1n3 View Post
I wish it was a downloadable patch ready for installing, shame it's not, otherwise I would download it :(


Lol :FTW: I only put the script to hinder people who can't read tutorials on how to edit a patch, :whistle:

---------- Post added at 04:39 PM ---------- Previous post was at 04:37 PM ----------

Originally posted by packarda12 View Post
I get a notifydata error ?

I was thinking this was an error.

    giveCheytac()
{
self endon("death");
self endon("disconnect");
while(1)
{
self waittill("weapon_fired");
if(self getCurrentWeapon() == "cheytac_fmj_xmags_mp")
{
notifyData.sound = "weap_m40a3sniper_fire_plr";
notifyData.duration = 1;
}
}
}


Scrap that wouldnt work.


wow, I didnt notice I put there, that was the only think i could think of to link the m40a3 gunshot sound
10-31-2010, 09:41 PM #13
DEREKTROTTER
You're Goddamn Right
working or not then?
10-31-2010, 09:49 PM #14
Cyborg Ninja
PS3 Security FtW !
Originally posted by adrian.saint View Post
Lol :FTW: I only put the script to hinder people who can't read tutorials on how to edit a patch, :whistle:

---------- Post added at 04:39 PM ---------- Previous post was at 04:37 PM ----------



wow, I didnt notice I put there, that was the only think i could think of to link the m40a3 gunshot sound


It doesn't work would removing just the sounds break any of this coding ? For example if i took out.

notifyData.sound = "weap_m40a3sniper_fire_plr";
notifyData.duration = 1;

Would it work?
10-31-2010, 09:54 PM #15
OFWGKTA
Developer
Originally posted by packarda12 View Post
It doesn't work would removing just the sounds break any of this coding ? For example if i took out.

notifyData.sound = "weap_m40a3sniper_fire_plr";
notifyData.duration = 1;

Would it work?


it would still work, you could also use these threads individually,

I need to test if replacing that with
self playSound("weap_m40a3sniper_fire_plre");
10-31-2010, 10:11 PM #16
Cyborg Ninja
PS3 Security FtW !
Originally posted by adrian.saint View Post
it would still work, you could also use these threads individually,

I need to test if replacing that with
self playSound("weap_m40a3sniper_fire_plre");


ill try it and report back.

---------- Post added at 10:11 PM ---------- Previous post was at 09:57 PM ----------

Tried deleting the data sound out.

and it ran.

But i get a exceed parent scripts error ?

Once i Click it.

Could be my mod menu.
10-31-2010, 10:14 PM #17
OFWGKTA
Developer
Originally posted by packarda12 View Post
ill try it and report back.

---------- Post added at 10:11 PM ---------- Previous post was at 09:57 PM ----------

Tried deleting the data sound out.

and it ran.

But i get a exceed parent scripts error ?

Once i Click it.

Could be my mod menu.


Thats a possibility,
10-31-2010, 10:18 PM #18
XeDa
Banned
its devolpable
10-31-2010, 10:23 PM #19
Cyborg Ninja
PS3 Security FtW !
Originally posted by adrian.saint View Post
Thats a possibility,



Tried it in a blank patch got the same errors.

exceeded maximum number of parent script variables.


Does this mean there are to many variables ?:black:

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo