Removing Binoculars
Moderator: Moderators
Removing Binoculars
We run a rifle only server and recently had a player using some type of magnification hack, wasn't binoculars or scope. No scoped weapons on the server. However someone mentioned that the binoculars were present and checked and they were there. Anyone know how we can remove them to prevent anyone from using them? Never thought to check for them before.
As I said the magnification the player was using was not the binoculars. The whole screen magnified not just a binocular view and a greater magnification than binoculars would give.
As I said the magnification the player was using was not the binoculars. The whole screen magnified not just a binocular view and a greater magnification than binoculars would give.
Doing the weapons was easy. Just used the weapons folder from pak6.pk3, deleted unwanted weapons and made changes M1 and KAR98 scr files. Problem with removing the binoculars is I can't find where to make the change to delete them. And there in lies my problem. If you could tell me where to find it or if there is a simple script to add and where to add it, it would be appreciated.
Thanks
Thanks
items
Pak0\models\items
He is probably using a modified global/items.scr script too because binoculars are normally singleplayer only.
He is probably using a modified global/items.scr script too because binoculars are normally singleplayer only.
Thanks, Tom.
I missed that going through all the pk3s. You look at so many things sometimes you miss the obvious. LOL
Then the best way to get rid of binoculars is to modify the pak0 by deleting binoculars from the items folder and then replace the pak0 on the server with the modified pak0?
I'm pretty new at this but have learned a lot from help from people willing to answer even dumb questions. LOL So I really appreciate the help.
I missed that going through all the pk3s. You look at so many things sometimes you miss the obvious. LOL
Then the best way to get rid of binoculars is to modify the pak0 by deleting binoculars from the items folder and then replace the pak0 on the server with the modified pak0?
I'm pretty new at this but have learned a lot from help from people willing to answer even dumb questions. LOL So I really appreciate the help.
Pak0
Pak0.pk3 is in everyone's game, So adding a new one with missing files wont do anything. I don't know very much about servers. Binoculars normally don't work in multiplayer, so he must of hacked your server and added new files.
I made a map that replaces the binoculars with a pointer.
Test_Pointer Map

It adds a new script named "items_dm.scr".
It is pretty easy to add a modified snipper scope client side -- I have one myself. So, It probably wouldn't be that hard to modify a plain rifle to zoom in, or shoot straighter.
Ps: Isn't there some server program that checks the client's game pk3's for modified files?
I made a map that replaces the binoculars with a pointer.
Test_Pointer Map

It adds a new script named "items_dm.scr".
It is pretty easy to add a modified snipper scope client side -- I have one myself. So, It probably wouldn't be that hard to modify a plain rifle to zoom in, or shoot straighter.
Ps: Isn't there some server program that checks the client's game pk3's for modified files?
Thanks for the response tltrude.
I tried the binoculars in multiplayer and they are there. I aslo thought they would not be present in multiplayer so never bothered to check.
I think it would work the same way as deleting the MG42s from the maps. But I don't know how people have done that either.
All the weapons are in everyone's game and by adding a modified pk3 to the server you can eliminate all the unwanted weapons seems the same should work with a modified pak0. Well, that's what logic says anyway, for what that's worth. LOL. What the heck it's worth a try. Got nothing to lose. LOL. May try as a added user pk3 and as a modified pak0.pk3. What the heck if it don't work can always undo the changes. (make original as pak0.bup instead of replacing it).
Maybe someone else has some ideas too.
I tried the binoculars in multiplayer and they are there. I aslo thought they would not be present in multiplayer so never bothered to check.
I think it would work the same way as deleting the MG42s from the maps. But I don't know how people have done that either.
All the weapons are in everyone's game and by adding a modified pk3 to the server you can eliminate all the unwanted weapons seems the same should work with a modified pak0. Well, that's what logic says anyway, for what that's worth. LOL. What the heck it's worth a try. Got nothing to lose. LOL. May try as a added user pk3 and as a modified pak0.pk3. What the heck if it don't work can always undo the changes. (make original as pak0.bup instead of replacing it).
Maybe someone else has some ideas too.
remove_item
Can't you just add a line like this to the weapons mod script?
local.player exec global/items.scr::remove_item "binoculars"
local.player exec global/items.scr::remove_item "binoculars"
Thanks, Tom. Thought for sure that would work. Even had a Homer Simpson moment when I read that. You know "DOH". Seemd like that was going to be it. However No Joy as NASA would say. Tried several variations of it as well. It seemed so logical even went as far as linking it all the way to the pak0.pk3 - exec pk0.pk3/models etc. just to be sure.
pak0
The game knows where the global folder is. The pk3 files are just compressed versions of the main folder.
The global/items.scr script does this when you ask it to run the remove_item thread.
-----------------------------------------------------------------------
remove_item local.item:
if (local.item == "binoculars")
{
$player take models/items/binoculars.tik
}
end
-----------------------------------------------------------------------
Your weapons mod must do something like that to remove the weapons.
The global/items.scr script does this when you ask it to run the remove_item thread.
-----------------------------------------------------------------------
remove_item local.item:
if (local.item == "binoculars")
{
$player take models/items/binoculars.tik
}
end
-----------------------------------------------------------------------
Your weapons mod must do something like that to remove the weapons.
Thaks again, Tom. I'll try that in the next day or so.
What we did in the weapons mod to make it rifle only was copy the weapons folder from the pak file into a new file, then just deleted all the script from the other weapons and left empty folders except for the M-1 and KAR, pistols and nades. then saved it as a user pk3. Though that would work the same with the binoculars so after I found out where they were in global/../items deleted the folders for binoculars but that didn't help.
I figured it knew where it was but previous post seemed so logical that when it didn't work I went the extra step as a last try.
What we did in the weapons mod to make it rifle only was copy the weapons folder from the pak file into a new file, then just deleted all the script from the other weapons and left empty folders except for the M-1 and KAR, pistols and nades. then saved it as a user pk3. Though that would work the same with the binoculars so after I found out where they were in global/../items deleted the folders for binoculars but that didn't help.
I figured it knew where it was but previous post seemed so logical that when it didn't work I went the extra step as a last try.
Re: pak0
Every time you respawn ( unless you choose a scoped weapon ) you are given the binoculars again so your mod will have to keep taking them over and over again .tltrude wrote:The game knows where the global folder is. The pk3 files are just compressed versions of the main folder.
The global/items.scr script does this when you ask it to run the remove_item thread.
-----------------------------------------------------------------------
remove_item local.item:
if (local.item == "binoculars")
{
$player take models/items/binoculars.tik
}
end
-----------------------------------------------------------------------
Your weapons mod must do something like that to remove the weapons.

