How do i give all my players the Silenced pistol
Moderator: Moderators
ive had the 1st person that tested this say this didnt work which didnt make any sense to me considering that everytime i use this script it seems to work perfectly for me,,so im gonna post the whole script i tested with and if anyone would like to try it and giv feedback on it would be great,,considering the time i put into this to make it work correctly for me i would feel much better knowing it worked for someone else also lol
Gold<<mohha freak
// SOUTHERN FRANCE
// ARCHITECTURE: SENN
// SCRIPTING: POWZER
main:
// set scoreboard messages
setcvar "g_obj_alliedtext1" "Southern France"
setcvar "g_obj_alliedtext2" ""
setcvar "g_obj_alliedtext3" ""
setcvar "g_obj_axistext1" ""
setcvar "g_obj_axistext2" ""
setcvar "g_obj_axistext3" ""
setcvar "g_scoreboardpic" "mohdm1"
// call additional stuff for playing this map round based is needed
if(level.roundbased)
thread roundbasedthread
level waitTill prespawn
//*** Precache Dm Stuff
exec global/DMprecache.scr
level.script = maps/dm/mohdm1.scr
thread weapons
thread allweapons
exec global/ambient.scr mohdm1
//exec global/ambient.scr mohdm2
//$world farplane 5000
//$world farplane_color (.333 .333 .329)
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
//-----------------------------------------------------------------------------
roundbasedthread:
// Can specify different scoreboard messages for round based games here.
level waitTill prespawn
level waittill spawn
// set the parameters for this round based match
level.dmrespawning = 0 // 1 or 0
level.dmroundlimit = 5 // round time limit in minutes
level.clockside = kills // set to axis, allies, kills, or draw
level waittill roundstart
end
Gold<<mohha freak
// SOUTHERN FRANCE
// ARCHITECTURE: SENN
// SCRIPTING: POWZER
main:
// set scoreboard messages
setcvar "g_obj_alliedtext1" "Southern France"
setcvar "g_obj_alliedtext2" ""
setcvar "g_obj_alliedtext3" ""
setcvar "g_obj_axistext1" ""
setcvar "g_obj_axistext2" ""
setcvar "g_obj_axistext3" ""
setcvar "g_scoreboardpic" "mohdm1"
// call additional stuff for playing this map round based is needed
if(level.roundbased)
thread roundbasedthread
level waitTill prespawn
//*** Precache Dm Stuff
exec global/DMprecache.scr
level.script = maps/dm/mohdm1.scr
thread weapons
thread allweapons
exec global/ambient.scr mohdm1
//exec global/ambient.scr mohdm2
//$world farplane 5000
//$world farplane_color (.333 .333 .329)
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
//-----------------------------------------------------------------------------
roundbasedthread:
// Can specify different scoreboard messages for round based games here.
level waitTill prespawn
level waittill spawn
// set the parameters for this round based match
level.dmrespawning = 0 // 1 or 0
level.dmroundlimit = 5 // round time limit in minutes
level.clockside = kills // set to axis, allies, kills, or draw
level waittill roundstart
end
Deadye tested the above script and said it works fine,,he also suggested i open the tiki file for the silencer and raise the dm damage to about 50,,also while in the tiki file if ya set the silencer ammo count for dm to about 10 that will put all the pistols including the silencer to the ammo count of around 94 ,,,i also changed the dmfiredelay as i like the silencer being more deadlier than be4,,,hope all this helps someone hehe,,,was fun,,and thanx Deadeye:)
Gold<<mohha freak
Gold<<mohha freak
- MPowell1944
- Moderator
- Posts: 287
- Joined: Thu Jan 09, 2003 7:06 am
- Location: Woodstock, GA
- Contact:
Only one problem with this script. When you switch teams, you get ammo from the other team along with the team you switched to (ex : you have 92 total rounds on Axis. you switch to Allies and all of a sudden your total rounds jump to 184.)
Any solution? I have tried messing with the code and even the .tik ammo amount. No matter what, when you switch teams or do a server restart, the ammo amount gets messed up.
Any solution? I have tried messing with the code and even the .tik ammo amount. No matter what, when you switch teams or do a server restart, the ammo amount gets messed up.
-
omniscient
- Major General
- Posts: 694
- Joined: Tue Sep 16, 2003 12:02 am
- MPowell1944
- Moderator
- Posts: 287
- Joined: Thu Jan 09, 2003 7:06 am
- Location: Woodstock, GA
- Contact:
Thanks omniscient, I'll give that a try. *EDIT* I tried that code you gave and now when I spawn it keeps taking the weapon away and not giving it back.
digitac, if you copy and paste the text into the colt/p38 file(s), you won't get the desired results. Trust me, I've tried.
*EDIT* Also 1 other problem with this script. If you drop your pistol, you will automatically get it back. You can then pickup the ammo from the dropped pistol. Must be because of the loop in the script.
digitac, if you copy and paste the text into the colt/p38 file(s), you won't get the desired results. Trust me, I've tried.
*EDIT* Also 1 other problem with this script. If you drop your pistol, you will automatically get it back. You can then pickup the ammo from the dropped pistol. Must be because of the loop in the script.
heres solution,,,,1st of all dont remove this line from the script
local.ammo_pistol = 94
if ya remove the above line ya will get unlimited ammo,,,,,ok next
heres how i solved the ammo solution and put the ammo count back to around stock levels,,,1st of all it wasnt adding the ammo from axis to allies but it was adding the ammo of the stock pistol to the silencer,,,meaning if ya choose allies ya got stock pistol then it would add them rounds to the silencer as well,,,now heres how i fixed that ,,i opened up the tiki file for the silencer and changed the dm ammo to 10,,,that put the ammo count on the silencer on 1 team to 95 if i recall right,,then when ya switch teams ya get the ammo count of 94,,,also if ya type restart in the console ya still get same ammo count 95 or 94 according to the team ya on,,,also while in the silencer tiki as suggested earlier may wanna change the dmbulletdamage to around 50 and the dmfiredelay down if ya want it to fire faster,,,hope this helps...i myself changed the firedelay to 0,,but guess thats just my preference:)
Gold<<<mohha freak
local.ammo_pistol = 94
if ya remove the above line ya will get unlimited ammo,,,,,ok next
heres how i solved the ammo solution and put the ammo count back to around stock levels,,,1st of all it wasnt adding the ammo from axis to allies but it was adding the ammo of the stock pistol to the silencer,,,meaning if ya choose allies ya got stock pistol then it would add them rounds to the silencer as well,,,now heres how i fixed that ,,i opened up the tiki file for the silencer and changed the dm ammo to 10,,,that put the ammo count on the silencer on 1 team to 95 if i recall right,,then when ya switch teams ya get the ammo count of 94,,,also if ya type restart in the console ya still get same ammo count 95 or 94 according to the team ya on,,,also while in the silencer tiki as suggested earlier may wanna change the dmbulletdamage to around 50 and the dmfiredelay down if ya want it to fire faster,,,hope this helps...i myself changed the firedelay to 0,,but guess thats just my preference:)
Gold<<<mohha freak
MPowell ya were correct ,,because of the loop in the script if ya drop ya silencer ya get it back,,,also noticed when ya drop it with the silencer tiki set to 10 on ammo count it also takes away most of ya ammo from the stock pistol,,,when dropped it put my stock pistol to the ammo count of 2,,,thus still making me realize the silencer and the stock pistol is sharing the ammo count in some way,,,also i noticed if i kept droppping and picking up with this configuration i could only get my ammo counts up to 200 on the pistols,,maybe this is the clue on were to look next,,,guess it could be set to 200 on pistol to solve that problem,,but if ya like me ya would like the standard ammo count
,,,well i guess i go dig a little more,,or maybe someone with good scripting skills will solve this be4hand,,im still learning myself ,,but its fun:)
Gold<<mohha freak
Gold<<mohha freak
- MPowell1944
- Moderator
- Posts: 287
- Joined: Thu Jan 09, 2003 7:06 am
- Location: Woodstock, GA
- Contact:
