Page 3 of 3

Posted: Sat Feb 21, 2004 3:07 am
by Gold
well i had something to do but now im back and messing around with this,,,and i know it can be done ,,just a matter of time be4 i figure it out,,for instance now i have both pistols at a 8 count in ammo and even if ya throw down the silencer and pick it back up ya still have only 8 count on ammo for both silencer and standard pistol,,once ya expend those rounds ya outta ammo,,so yeah it can be done lol,,heres how i acomplished that,,now may end up with something different than this by the time i figure out how to raise the ammo on both the silencer and stadard pistol back to round 94,,just posting this so ya can see it can be done lol:))

weapons:
level.all_weapons = int(getcvar(all_weapons))
if(level.all_weapons == 1)
{
$player take pistol
$player item models/weapons/silencedpistol.tik
//local.ammo_pistol = 94
}
wait 0.2
goto weapons
end

allweapons:
wait 2
$player stufftext "all_weapons 1"

end
gettin closer:)

Gold<<mohha freak

Posted: Sat Feb 21, 2004 4:05 am
by MPowell1944
To solve the drop gun problem, simply make sure that this is in the animations section of the silencedpistol.tik file :

Code: Select all

idle     hs_pistol.skc
{
	server
	{
		first notdroppable
	}
}
Now the gun cannot be dropped. Problem solved.

Posted: Sat Feb 21, 2004 4:55 am
by Gold
works great:) I guess thats why its always good to post because someone else could be thinking something ya hadnt thought of lol,,also im sure ya know that ya could use same info to add any weapon to any team :) I havent played around with the other weapons as of yet ,,reason being i guess i love the silencers,,,thanx alot for ya help,,learned some more 2day which is always a treat:)

Gold<<mohha freak

Posted: Sat Feb 21, 2004 2:20 pm
by MPowell1944
What I am trying to do is replace the stock pistols with the silenced pistol. I have already done that, and fixed the drop bug, but I have yet to be able to change the ammo count on the gun. Once I manage that, the mod should be all set. I am trying to work this out for the server I admin.

Posted: Sat Feb 21, 2004 2:34 pm
by Gold
well i posted above how i changed the ammo count,,no matter which team im on or whether or not i type restart i have the ammo count of 94 or 95,,,if thats not workin for ya im confused once more lol

Gold<<mohha freak

Posted: Sun Feb 22, 2004 1:04 am
by MPowell1944
Even with your script, I only get 8 rounds in the gun. I also gave the player a shotgun, just to see if that ammo amount is fubar as well, and it isn't. It gives the shotgun the correct amount of ammo everytime, no matter how many times you switch teams. Nowhere in the script does it limit the ammo amount for the pistol. I am deeply confused.

Posted: Sun Feb 22, 2004 2:13 am
by Gold
maybe this will help some ,,heres the script im using

level waittill spawn

weapons:
level.all_weapons = int(getcvar(all_weapons))
if(level.all_weapons == 1)
{
$player item models/weapons/silencedpistol.tik
local.ammo_pistol = 94
}
wait 0.2
goto weapons
end

allweapons:
wait 2
$player stufftext "all_weapons 1"

end

heres the tiki changes i made,,some in which ya gav me pointers on:)
// DM Attributes silenced pistol

dmbulletcount 1
dmstartammo 10 //<<<<<<<<changed
dmammorequired 1
dmfiredelay 0 //<<<<<<<<<<changed
dmbulletrange 4000
dmbulletdamage 50
dmbulletspread 25 25 150 150 //original 5 5 150 150
dmcrosshair 1
dmmovementspeed 1.0

// Secondary fire DM Attributes
secondary dmammorequired 0
secondary dmbulletrange 96
secondary dmbulletdamage 35

// this is attached to the player during reload
cache models/ammo/silencedpistol_clip.tik
}
client
{
cache tracer.spr
cache muzsprite.spr
cache models/ammo/pistolshell.tik
}
}

animations
{
idle hs_pistol.skc
reload hs_pistol_reload.skc
{
server
{
first notdroppable //<<<<<<<<<<<<<<added Mcpowell
18 surface clip +nodraw
39 surface clip -nodraw
last idle
}
client

and with this configuration if i choose axix and machine gun the silencer and the colt have 94 each on ammo count,,,if i join allies the ammo count is 95 each for both pistols,,,now what would be nice is if we could limit or add to the ammo count within the script,,now i have read many posts that explain how to do this,,and i have prob tried them all so far with no sucsess,,,the only sucsess i have had at all is changing the count in the silencer tiki file,,also i didnt mess with the other pistol tiki files,,if i can help in any way more just ask,,always testing something here:)

Gold<<mohha freak

Posted: Sun Feb 22, 2004 2:16 am
by Gold
also i reread ya posts if ya now trying to have silencers only without the stock pistols,,let me know what ya want ammo count to be on the silencers and i see if i can help ya:)

Gold<<mohha freak

Posted: Sun Feb 22, 2004 3:57 am
by MPowell1944
Ammo count should be a total of 24 rounds. 8 in gun plus 2 extra clips. Here is code I have now, which is causing the ammo malfunction in the guns. Your above script does work, but only if I wanted to add the pistol instead of replacing the stock ones.

Code: Select all

weapons:
level.all_weapons = int(getcvar(all_weapons)) 
if(level.all_weapons == 1) 
{
$player take models/weapons/colt45.tik
$player take models/weapons/p38.tik
$player item models/weapons/silencedpistol.tik 
local.ammo_pistol = 94
}
wait 0.2 
goto weapons 
end

Posted: Sun Feb 22, 2004 4:37 am
by Gold
ok im assuming ya using a custom pk3 to test all this,,,try this i think ya like it ,,i modified the tikis to my liking which i hope ya also like the silencer this way also lol,,1st using pakscape just drag out the p38tik and the colt45 tik,,,now just overwrite them both with this script and drop them in ya custom pk3,,also now if ya still have the silencer.tik in the custom pk3 delete it,,,,try this think ya like it

TIKI
setup
{
scale 0.52 // Set default scale to 16/30.5 since world is in 16 units per foot and model is in cm's
path models/weapons/highstandard
skelmodel hs_pistol.skd
surface pistol1 shader hi_standard
surface pistol2 shader hi_standard
surface clip shader hi_standard

}
$define sounddir sound/weapons

init
{
server
{
// surface tag* +nodraw
// surface origin +nodraw

classname Weapon
weapontype pistol
name "Hi-Standard Silenced"
rank 130 130


pickupsound silencer_snd_pickup
ammopickupsound silencer_snd_pickup_ammo
noammosound silencer_snd_noammo

// Holstering info
// holstertag "Bip01 Pelvis"
// holsteroffset "1.5 -4 -10.0"
// holsterangles "5 190 195"
// holsterScale 1.0

// Primary fire type info
firetype bullet
ammotype "pistol"
meansofdeath bullet
semiauto
bulletcount 1
clipsize 8
startammo 8
ammorequired 1
firedelay 1.0
bulletrange 4000
bulletdamage 100 // was 55 before getting beefed up by z
bulletspread 35 35 150 150 //original 5 5 150 150, was 25 25 150 150 before getting beef up by z
movementspeed 1.0

tracerfrequency 1

crosshair 1
quiet // don't notify AI of it being fired

secondary firetype melee
secondary ammotype none
secondary meansofdeath bash
secondary ammorequired 0
secondary bulletrange 64
secondary bulletdamage 35
secondary bulletknockback 50
secondary quiet

// AI animation group info
weapongroup pistol

// DM Attributes
dmbulletcount 1
dmstartammo 24
dmammorequired 1
dmfiredelay 0
dmbulletrange 4000
dmbulletdamage 50
dmbulletspread 25 25 150 150 //original 5 5 150 150
dmcrosshair 1
dmmovementspeed 1.0

// Secondary fire DM Attributes
secondary dmammorequired 0
secondary dmbulletrange 96
secondary dmbulletdamage 35

// this is attached to the player during reload
cache models/ammo/silencedpistol_clip.tik
}
client
{
cache tracer.spr
cache muzsprite.spr
cache models/ammo/pistolshell.tik
}
}

animations
{
idle hs_pistol.skc
reload hs_pistol_reload.skc
{
server
{
18 surface clip +nodraw
39 surface clip -nodraw
last idle
}
client
{
entry sound silencer_snd_reload item
}

}
secondaryfire hs_pistol.skc
{
server
{
entry shoot secondary
}
}
fire hs_pistol_fire.skc
{
server
{
entry shoot primary
}
client
{
entry stopaliaschannel silencer_snd_fire
entry sound silencer_snd_fire

// By now, the server has already fired the weapon, so it's
// ok to apply the view kick apon entry to avoid problems
// with multiple application on single frame animations.

////////////////////////////////////////////////////////////////////////////////////////
// View Kick Controls
//
// View Kicking works based on the assumptions that every weapon has its own tendencies to kick in
// a paticular fashion. In MOH we call then scatter patterns. Currently we have 2 scatter patterns which
// will be explained.
// Scatter Patterns:
// "V" - the cone. The longer you shoot the more random your shots will be in the horizontal axis.
// "T" - the T shape. The gun has a tendancy to push in a paticular direction. not used much...too artificial looking
//
//
// +-------------------------------------------- Scatter Pitch Min
// | +--------------------------------------- Scatter Pitch Max
// | | +------------------------------- Scatter Yaw Min
// | | | +--------------------------- Scatter Yaw Max
// | | | | +--------------------- The Recentering speed in fraction per second
// | | | | | +---------------- The Scatter Pattern
// | | | | | | +---------- The absolute pitch min/max
// | | | | | | | +------- The absolute yaw min/max
// | | | | | | | | +----- This is the pitch at which you loose all
// | | | | | | | | | control of the weapon and its behavior is
// | | | | | | | | | purely random.
// V V V V V V V V V

entry viewkick -0.2 -0.2 0.0 0.0 1 "V" 3.0 1.0 1.6


// muzzle flash
entry tagdlight tag_barrel 0.25 0.2 0.15 120 0.11
entry tagspawn tag_barrel
(
scale 0.2
offsetalongaxis 2 0 0
count 1
alpha 0.5
model muzsprite.spr
angles 0 0 crandom 25
life 0.01
)

// smoke puff
// entry commanddelay 0.05 tagspawn tag_barrel
// (
// volumetric
// model gun // sets the type of smoke
// life 10 // amount of smoke
// scale 1.0 // radius
// alpha 0.3 // density
// color 0.7 0.7 0.7 // RBG color of the smoke
// velocity 2 // base velocity away from the surface
// randvelaxis random 6 0 0 // velocity offset
// offsetalongaxis random 4 0 0 // positional offset
// )

// shell eject
entry commanddelay 0.1 tagspawn tag_eject
(
count 1
model models/ammo/pistolshell.tik
spawnrange 1024
scale 1.0
velocity 50
randvel crandom 10 crandom 10 random 20
emitterangles 0 0 0
avelocity crandom 90 crandom 90 0
accel 0 0 -800
physicsrate 20
life 2.0
fadedelay 1.7
collision
bouncefactor 0.6
bouncesoundonce snd_pistol_shell
)

// shell eject puff
entry commanddelay 0.1 tagspawn tag_eject
(
count 2
model vsssource.spr
alpha 0.30
color 0.50 0.50 0.50
spritegridlighting
scale 0.10
life 1.00
scalerate 10.00
velocity 60.00
randvel range 20 -60 crandom -40 range 20 -60
friction 5.00
fade
randomroll
)
}
}
}

/*QUAKED playerweapon_allied_highstandard-pistol (0.0 0.0 1.0) (-8 -8 -8) (8 8 8)
American highperformance Pistol
*/


the above will give the ammo count ya desired plus fast fire rates,,and more damage to the targets:) test it with a map that has no modified weapon scripts as we hav been testing previously,,,and let me know what ya think :)

Gold<<mohha freak

Posted: Sun Feb 22, 2004 2:59 pm
by MPowell1944
Now I get different ammo amount for each team. 92 for axis and 108 for allies. This is after I take the p38/colt from the player.

Code: Select all

weapons: 
level.all_weapons = int(getcvar(all_weapons)) 
if(level.all_weapons == 1) 
{
$player take models/weapons/colt45.tik
$player take models/weapons/p38.tik
$player item models/weapons/silencedpistol.tik 
local.ammo_pistol = 94 
} 
wait 0.2 
goto weapons 
end 

allweapons: 
wait 2 
$player stufftext "all_weapons 1" 

end

Posted: Mon Feb 23, 2004 2:01 pm
by MPowell1944
Ok, I have a working version on my machine, however, when I put that same version on my clan server, the players never get the silent pistol. We are running MAM and BuzzGoodies, however, even if I take them out, the mod continues to not work even though it did on my machine. Anyone have a clue why it wouldn't work on my clan server but would on my machine, being the exact same file with no other files that are interfering?