Removing Binoculars

Want to recruit some people for your mod ? Want to work on a mod ? Post the relevant info here. Not for mapping questions.

Moderator: Moderators

Post Reply
Rizzo
Private
Posts: 9
Joined: Thu Jul 12, 2007 7:09 pm

Removing Binoculars

Post by Rizzo »

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.
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post by bdbodger »

You can take them away like any other weapon .
Image
Rizzo
Private
Posts: 9
Joined: Thu Jul 12, 2007 7:09 pm

Post by Rizzo »

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
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

items

Post by tltrude »

Pak0\models\items

He is probably using a modified global/items.scr script too because binoculars are normally singleplayer only.
Tom Trude,

Image
Rizzo
Private
Posts: 9
Joined: Thu Jul 12, 2007 7:09 pm

Post by Rizzo »

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.
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

Pak0

Post by tltrude »

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
Image


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?
Tom Trude,

Image
Rizzo
Private
Posts: 9
Joined: Thu Jul 12, 2007 7:09 pm

Post by Rizzo »

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.
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post by bdbodger »

nobody makes modified pak0.pk3's they mod a file and put it in a pk3 that they make . The pk3's are read alphabetically so user or zz's in front of the name of the pk3 will make your file overwrite the stock file . Modding stock pk3's is a good way if your looking for trouble .
Image
Rizzo
Private
Posts: 9
Joined: Thu Jul 12, 2007 7:09 pm

Post by Rizzo »

Was just brain storming. Did try making a new user.pk3 containing the folders models" and subfolder "items" leaving everything in except deleting contents of binoculars. Didn't work. So back to the drawing board as they say.
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

remove_item

Post by tltrude »

Can't you just add a line like this to the weapons mod script?

local.player exec global/items.scr::remove_item "binoculars"
Tom Trude,

Image
Rizzo
Private
Posts: 9
Joined: Thu Jul 12, 2007 7:09 pm

Post by Rizzo »

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.
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

pak0

Post by tltrude »

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.
Tom Trude,

Image
Rizzo
Private
Posts: 9
Joined: Thu Jul 12, 2007 7:09 pm

Post by Rizzo »

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.
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Re: pak0

Post by bdbodger »

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.
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 .
Image
Rizzo
Private
Posts: 9
Joined: Thu Jul 12, 2007 7:09 pm

Post by Rizzo »

Thanks for the help guys. However Nothing seems to remove the binoculars at all. Think I'm about to give it up as one of those things that can't be done unless someone has some other ideas.

Thanks again for the help.
Post Reply