sniper script
Posted: 26 Nov 2018 12:13
copied from cod4x.me
Here is the snipers_only.gsc I fixed for my server, I used Dans simple snipers script ( thanks for leaving that up ) and added a anti camper section to it.There is dvar check to see if it's on or off you need to set in server.cfg, ( set scr_snipers 1 )I did this so on my server I can change back to normal load outs in console, and it takes effect after map change.
The anti camper part of script I added due to the fact it wasn't getting the correct camp times in my main anti camp script. I was using the camp times for mg's not the sniper times, it checks for weapons and has different times for snipers and non-sniper weapons so to get around this I added a dvar check on my main anti camper.gsc
if(getdvarint("scr_snipers") == 1)
return;
so when the server is set to snipers only it doesn't run.
All you need to do is set the script for the weapon and perks you want to use,and the camping times. Just so you know if you want players to have a pistol you have to remove the line self SwitchToWeapon("remington700_mp"); because with that in there the pistol will just flash and go away.
Here is the snipers_only.gsc I fixed for my server, I used Dans simple snipers script ( thanks for leaving that up ) and added a anti camper section to it.There is dvar check to see if it's on or off you need to set in server.cfg, ( set scr_snipers 1 )I did this so on my server I can change back to normal load outs in console, and it takes effect after map change.
The anti camper part of script I added due to the fact it wasn't getting the correct camp times in my main anti camp script. I was using the camp times for mg's not the sniper times, it checks for weapons and has different times for snipers and non-sniper weapons so to get around this I added a dvar check on my main anti camper.gsc
if(getdvarint("scr_snipers") == 1)
return;
so when the server is set to snipers only it doesn't run.
All you need to do is set the script for the weapon and perks you want to use,and the camping times. Just so you know if you want players to have a pistol you have to remove the line self SwitchToWeapon("remington700_mp"); because with that in there the pistol will just flash and go away.