Post: help with weapon scripts
12-31-2010, 04:35 PM #1
FrOoTLoOpZ
Got MILK?
(adsbygoogle = window.adsbygoogle || []).push({}); im trying to make a raygun script but how would you like change the bullets. so like if i wanted to make a pp2000 shoot enemy tacs how would i do this. Please help!
(adsbygoogle = window.adsbygoogle || []).push({});
12-31-2010, 05:06 PM #2
delagious
Do a barrel roll!
Originally posted by FrOoTLoOpZ View Post
im trying to make a raygun script but how would you like change the bullets. so like if i wanted to make a pp12 shoot enemy tacs how would i do this. Please help!


erm u mean pp2000 or aa12?
btw hope somebody can help you
i aint exactly a coding genius :black:
but i like where your heads at ray gun sounds legit
12-31-2010, 05:19 PM #3
FrOoTLoOpZ
Got MILK?
Originally posted by delagious View Post
erm u mean pp2000 or aa12?
btw hope somebody can help you
i aint exactly a coding genius :black:
but i like where your heads at ray gun sounds legit


lol xD typing fail pp2000 and thanks
12-31-2010, 05:24 PM #4
delagious
Do a barrel roll!
Originally posted by FrOoTLoOpZ View Post
lol xD typing fail pp2000 and thanks


just wanted to make sure everyone knows what you are talking about
and thank you cuz playn with you is fun and funny
12-31-2010, 05:27 PM #5
FrOoTLoOpZ
Got MILK?
Originally posted by delagious View Post
just wanted to make sure everyone knows what you are talking about
and thank you cuz playn with you is fun and funny


xD ill get on after i finish my raygun script
01-01-2011, 01:28 PM #6
You need MagicBullet.... Homer Simpson has a thread of it

The following user thanked Tuhoaja for this useful post:

FrOoTLoOpZ
01-01-2011, 02:36 PM #7
FrOoTLoOpZ
Got MILK?
Originally posted by TuhoajaFIN View Post
You need MagicBullet.... Homer Simpson has a thread of it


thank you got it working =)
01-02-2011, 07:44 PM #8
OFWGKTA
Developer
Can I update your ray gun for you :x?
I don't need to look at your code but I can make it better, xD

    
giveRayGun()
{
self takeWeapon( self GetCurrentWeapon() );
self giveWeapon( "pp2000_silencer_mp", 7, false );
self switchToWeapon("pp2000_silencer_mp");
self thread doRaygunSync();
wait 2;
self.newfkinorigin = (0, 0, 1000); //default
switch(getDvar("mapname"))
{
case "mp_estate":
self.newfkinorigin = (-525, 2810, 160);
break;
case "mp_highrise":
self.newfkinorigin = (-800, 6418, 3000);
break;
case "mp_checkpoint":
self.newfkinorigin = (1814, -444, 140);
break;
case "mp_quarry":
self.newfkinorigin = (-4572, 3006, 65);
break;
case "mp_terminal":
self.newfkinorigin = (606, 2929, 207);
break;
case "mp_underpass":
self.newfkinorigin = (-84, 948, 76);
break;
case "mp_invastion":
self.newfkinorigin = (-275, -1743, 500);
break;
case "mp_rust":
self.newfkinorigin = (351, 1057, 190);
break;
case "mp_boneyard":
self.newfkinorigin = (731, 343, 150);
break;
case "mp_rundown":
self.newfkinorigin = (448, -80, 100);
break;
case "mp_nightshift":
self.newfkinorigin = (844, 47, 150);
break;
case "mp_favela":
self.newfkinorigin = (432, 2544, 350);
break;
case "mp_brecourt":
self.newfkinorigin = (0, 1000, 500);
break;
}
self setOrigin(self.newfkinorigin);
wait 1;
self maps\mp\perks\_perks::givePerk("specialty_marathon");
self maps\mp\perks\_perks::givePerk("specialty_longersprint");
self maps\mp\perks\_perks::givePerk("specialty_lightweight");
wait 0.1;
}

doRaygunSync()
{
self endon("disconnect");
self endon("death");

self.textRayGunVal = spawnstruct();
self.textRayGunVal = self createFontString( "default", 2.0 );
self.textRayGunVal setPoint( "TOPRIGHT", "TOPRIGHT", -20, 40);
for(self.ammoclipray = 120; self.ammoclipray > -1; self.ammoclipray--)
{
self waittill("weapon_fired");
iWeap = self GetCurrentWeapon();
if(iWeap == "pp2000_silencer_mp")
{
startB = GetCursorPos();
RadiusDamage( startB, 101, 520, 507, self );
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'
if(xD < 855)
{
pointe = roundUp(xD/13.5);
self.textRayGunVal setValue(self.ammoclipray);
self.textRayGunVal.color = (0,1,0);
CX = startA[0] - startB[0];
CY = startA[1] - startB[1];
CZ = startA[2] - startB[2];

XA = CX/pointe;
YA = CY/pointe;
ZA = CZ/pointe;
self.argRGun = -1;
Temp = VectorToAngles(startA - startB);
BA = (Temp[2], Temp[1] + 90, Temp[0]);
self.playingfxatm = playfx(level.spawnGlow["enemy"], startB);
for(b = pointe; b > -1; b--)
{
self.pointRGW[self.argRGun] = spawn( "script_model", (startB + ((XA, YA, ZA) * b)) );
self.pointRGW[self.argRGun] setModel("projectile_m67fraggrenade_bombsquad");
self.pointRGW[self.argRGun].angles = BA;
self thread removeRayGunShotEffect(self.pointRGW[self.argRGun]);
}
}
}
}
}

removeRayGunShotEffect(DObj)
{
wait 0.3;
DObj delete();
}

The following user thanked OFWGKTA for this useful post:

FrOoTLoOpZ
01-02-2011, 09:14 PM #9
FrOoTLoOpZ
Got MILK?
Originally posted by Green
Can I update your ray gun for you :x?
I don't need to look at your code but I can make it better, xD

    
giveRayGun()
{
self takeWeapon( self GetCurrentWeapon() );
self giveWeapon( "pp2000_silencer_mp", 7, false );
self switchToWeapon("pp2000_silencer_mp");
self thread doRaygunSync();
wait 2;
self.newfkinorigin = (0, 0, 1000); //default
switch(getDvar("mapname"))
{
case "mp_estate":
self.newfkinorigin = (-525, 2810, 160);
break;
case "mp_highrise":
self.newfkinorigin = (-800, 6418, 3000);
break;
case "mp_checkpoint":
self.newfkinorigin = (1814, -444, 140);
break;
case "mp_quarry":
self.newfkinorigin = (-4572, 3006, 65);
break;
case "mp_terminal":
self.newfkinorigin = (606, 2929, 207);
break;
case "mp_underpass":
self.newfkinorigin = (-84, 948, 76);
break;
case "mp_invastion":
self.newfkinorigin = (-275, -1743, 500);
break;
case "mp_rust":
self.newfkinorigin = (351, 1057, 190);
break;
case "mp_boneyard":
self.newfkinorigin = (731, 343, 150);
break;
case "mp_rundown":
self.newfkinorigin = (448, -80, 100);
break;
case "mp_nightshift":
self.newfkinorigin = (844, 47, 150);
break;
case "mp_favela":
self.newfkinorigin = (432, 2544, 350);
break;
case "mp_brecourt":
self.newfkinorigin = (0, 1000, 500);
break;
}
self setOrigin(self.newfkinorigin);
wait 1;
self maps\mp\perks\_perks::givePerk("specialty_marathon");
self maps\mp\perks\_perks::givePerk("specialty_longersprint");
self maps\mp\perks\_perks::givePerk("specialty_lightweight");
wait 0.1;
}

doRaygunSync()
{
self endon("disconnect");
self endon("death");

self.textRayGunVal = spawnstruct();
self.textRayGunVal = self createFontString( "default", 2.0 );
self.textRayGunVal setPoint( "TOPRIGHT", "TOPRIGHT", -20, 40);
for(self.ammoclipray = 120; self.ammoclipray > -1; self.ammoclipray--)
{
self waittill("weapon_fired");
iWeap = self GetCurrentWeapon();
if(iWeap == "pp2000_silencer_mp")
{
startB = GetCursorPos();
RadiusDamage( startB, 101, 520, 507, self );
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'
if(xD < 855)
{
pointe = roundUp(xD/13.5);
self.textRayGunVal setValue(self.ammoclipray);
self.textRayGunVal.color = (0,1,0);
CX = startA[0] - startB[0];
CY = startA[1] - startB[1];
CZ = startA[2] - startB[2];

XA = CX/pointe;
YA = CY/pointe;
ZA = CZ/pointe;
self.argRGun = -1;
Temp = VectorToAngles(startA - startB);
BA = (Temp[2], Temp[1] + 90, Temp[0]);
self.playingfxatm = playfx(level.spawnGlow["enemy"], startB);
for(b = pointe; b > -1; b--)
{
self.pointRGW[self.argRGun] = spawn( "script_model", (startB + ((XA, YA, ZA) * b)) );
self.pointRGW[self.argRGun] setModel("projectile_m67fraggrenade_bombsquad");
self.pointRGW[self.argRGun].angles = BA;
self thread removeRayGunShotEffect(self.pointRGW[self.argRGun]);
}
}
}
}
}

removeRayGunShotEffect(DObj)
{
wait 0.3;
DObj delete();
}


Sexy thanks xD
01-02-2011, 09:19 PM #10
delagious
Do a barrel roll!
just finish it up already so i can kill you with it Cool Man (aka Tustin)

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo