jv_bot01.pk3 file check

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
User avatar
Cheech
Corporal
Posts: 25
Joined: Mon Jul 21, 2003 5:41 pm
Location: Germany
Contact:

jv_bot01.pk3 file check

Post by Cheech »

Hi
i build a server side addon for obj_team2 to play the map with bots. it works fine on the server, but if the client have not intsalled the jv_bot01.pk3 file, he see only invisible botplayers. i need a part of a mapscript where i can check if the jv_bot01.pk3 file is installed and if not the client should be disonnected from the server.
sry for my bad english
hope that somebody have a solution for this problem.
thx
Cheech
visit our region in moh
www.steinhuder-meer.us
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

I wouldn't know a way around this off the top of my head :(
Image
M&M
General
Posts: 1427
Joined: Sun Sep 14, 2003 1:03 am
Location: egypt
Contact:

Post by M&M »

maybe u should put a warning or something 2 inform the players that jv_bot01.pk3 is needed to play on this server .that way they are they ones 2 blame if they still join :idea:
Image
blue60007
General
Posts: 1247
Joined: Sun Mar 07, 2004 11:44 pm

Post by blue60007 »

or try packaging the bot script with the map file...
Image
M&M
General
Posts: 1427
Joined: Sun Sep 14, 2003 1:03 am
Location: egypt
Contact:

Post by M&M »

its a server side mod,meaning the client just logs on and if he has the jv bots he can play fine.the jv bots arent just script .if he did that ,he still would c invisile bots :? (or not c them).like playing with some1 who has a skin u dont have .
i dont think there is a real way 2 fix it ,but putting a warning in the server title or anywhere that jv_bots are needed
Image
User avatar
Cheech
Corporal
Posts: 25
Joined: Mon Jul 21, 2003 5:41 pm
Location: Germany
Contact:

Post by Cheech »

Hi
ok thank you.
yes i have placed a gamemessage that the jv_bot01.pk3 is required.
i have named the gametypestring to jv_bot01 with the mapscript, so the players can see it in the serverlist.
i hope thats enough for the players and nobody get angry with the server who?s playing this mod.
visit our region in moh
www.steinhuder-meer.us
M&M
General
Posts: 1427
Joined: Sun Sep 14, 2003 1:03 am
Location: egypt
Contact:

Post by M&M »

Cheech wrote:i hope thats enough for the players and nobody get angry with the server who?s playing this mod.
i dont think they will get angry :?
i think they will be delighted that ur playing jv's great mod :wink: .
and if i had a faster connection id ask u for the ip to play but regretfully my 56 wont allow me :wink: .
and for those **** who are to lazy to dload it than they are missing out on great stuff on ur server :wink:

(can i become an admin now?) :P
Image
Krane
Lieutenant General
Posts: 782
Joined: Sat May 31, 2003 4:18 pm
Location: California, USA
Contact:

Post by Krane »

Wait...Hey jv, do you remember my russianbots skinpack? We exchange emails about that.

I made a jvbot-mod-skin-pack w/ the spearhead russian models. It's a combination of skins and custom bots. to use these skins as part of the alliesspawnpreset you need to add a line to your script file, something like:

exec global/russian_bots.scr

Well, in the russian_bots.scr there's a thread that checks if you have jvbots inside your main folder. If not, the map doesn't spawn the bots, I think that's what you want...

Unfortunatly, I don't have my PC here (only my Mac). Go to my site and download the russianbots and check the script. I'm sure what you want is there.
Image
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

Well Krane, that is only a server side check. What Cheech needs is a client side check :(
Image
Krane
Lieutenant General
Posts: 782
Joined: Sat May 31, 2003 4:18 pm
Location: California, USA
Contact:

Post by Krane »

Er...good point, jv...I can't think in how it can be done...maybe a in-game mod...
Image
M&M
General
Posts: 1427
Joined: Sun Sep 14, 2003 1:03 am
Location: egypt
Contact:

Post by M&M »

well,what i understood is he needs a server side check .so if ur russian bots krane had a similar thing than it would work fine i guess.
Image
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

Let me word it a bit different: he needs a server-side thing that checks for client-side files :wink:
Image
M&M
General
Posts: 1427
Joined: Sun Sep 14, 2003 1:03 am
Location: egypt
Contact:

Post by M&M »

oh ,i c . :oops: .i guess krane's mod doesnt check the client side :wink:
Image
dcoshea
Colour Sergeant
Posts: 94
Joined: Thu Mar 04, 2004 3:00 am
Location: Sydney, Australia
Contact:

Post by dcoshea »

Okay, how about you put a script, say "jv_bot_detect.cfg", into the .pk3 that you want clients to install; this script should do something you can detect happening on the server, like

Code: Select all

+use
(I'm assuming that if you can enter

Code: Select all

+use
in the console you can do it from a .cfg file)

Now, when you want to detect if a player has the .pk3 installed, do:

1.

Code: Select all

local.player stufftext exec jv_bot_detect.cfg
to execute the script (which won't execute, and hence won't start holding down USE, if the player doesn't have the .pk3)
2. perhaps you'll have to wait a moment for the action to occur - if the player has a 200ms ping I guess it might take 200ms, so perhaps it'd be safest to

Code: Select all

wait 1
here since I guess the

Code: Select all

stufftext
returns immediately rather than wait for the client to actually receive the command and execute it
3. check if the player is holding USE (

Code: Select all

if (local.player useheld)
); if they are they probably have the .pk3 installed, but it could of course just be that they are opening a door/picking something up at that time, so it'd be best to do the check every now and then, and not only at the start of the round; if they do not have USE held they almost certainly don't have the mod installed (or they are very lagged) so you could do a

Code: Select all

local.player iprint
message to that effect.
4. if they had USE held you should release it for them via

Code: Select all

local.player stufftext -use
I'm not sure if this could interfere with the player doing things which require them to hold down USE for a while (e.g. those medic's packs I mentioned on TMT a while ago); if they are really holding down the USE key on their keyboard and we send

Code: Select all

-use
to their console, will it stuff them up?

Another thing you could do that is more difficult is to have the .cfg file do a

Code: Select all

setu my_pk3_installed 1
and then have an external program send an rcon to the server to do a

Code: Select all

dumpuser
on each player once all the

Code: Select all

stufftext[code] commands have been sent; [code]my_pk3_installed : 1
(or something like that) should appear for every player that has the mod installed, and, for the rest, the external program should inform the script that it needs to send a message to that player (or it could do a

Code: Select all

say
as console).

[Edit: So in summary, I guess you could say the first method is more likely to interfere with the player's game, but it's much easier since it doesn't require interfacing with an external program.

Also, sorry about the formatting with the code tags, I'll remember that they always cause a block display next time.]

Regards,
David
doomsday
Private
Posts: 9
Joined: Tue Aug 05, 2003 2:02 am
Location: Canada

Running V2 with Bots on my Breakthrough server

Post by doomsday »

I have the title "V2 with Bots jv_bot01.pk3 required" but still most people who show up can't figure it out when I follow them in spectate. If I tell them where to get it they usually don't return. Will try putting in a message saying "if u can't see the bots u need jv_bot01.pk3" and somewhere to download it with the message. About 40 people visited Friday some understood and played awhile but hope Saturday is an improvement and more people will get the pk3. IP:66.199.183.210:12290
Post Reply