Scripting Healthpacks that drop on death

Have a question about modding, modelling or skinning? Have a tutorial to post? Post here!

Moderator: Core Staff

IzNoGoD
CJ Worshipper
CJ Worshipper
Posts: 343
Joined: January 6th, 2009, 8:39 pm
Location: Netherlands/Holland

Re: Scripting Healthpacks that drop on death

Post by IzNoGoD » July 13th, 2011, 3:54 pm

/RCON scr_say test
LMGTFY!

Its not a glitch... Its the future!

F |Madness| U
CJ G0D!
CJ G0D!
Posts: 1575
Joined: June 3rd, 2009, 9:02 pm
Location: Cardiff University, UK

Re: Scripting Healthpacks that drop on death

Post by F |Madness| U » July 13th, 2011, 5:49 pm

Don't need to do rcon, I (client) am the server. I did try rocn anyway though, still get the same "unknown cmd scr_say".
-

Nekoneko
CJ Fan
CJ Fan
Posts: 170
Joined: April 18th, 2011, 3:48 pm

Re: Scripting Healthpacks that drop on death

Post by Nekoneko » July 13th, 2011, 7:28 pm

Well the thing is..
If you don't have it set before, it will give you an unknown cmd.
Means typing /scr_say Hello , will simply give an unknown cmd error.
But if you set it before with SetDvar("scr_say","nothing"); in a script, or as a client with /set scr_say nothing,
Then type /scr_say Hello, it won't give an unknown cmd error.
As I wrote before, what happens if you simply type it in the console, without hitting enter, like this:
Does yours say: default nothing ? If it doesn't, it wasn't set before per script.
You do not have the required permissions to view the files attached to this post.

IzNoGoD
CJ Worshipper
CJ Worshipper
Posts: 343
Joined: January 6th, 2009, 8:39 pm
Location: Netherlands/Holland

Re: Scripting Healthpacks that drop on death

Post by IzNoGoD » July 13th, 2011, 7:43 pm

F |Madness| U wrote:Don't need to do rcon, I (client) am the server. I did try rocn anyway though, still get the same "unknown cmd scr_say".

In that case, run it as a dedi server, as setcvar doesnt work on non-dedi servers.
Use /rcon scr_say hello world then.
LMGTFY!

Its not a glitch... Its the future!

User avatar
Drofder2004
Core Staff
Core Staff
Posts: 13313
Joined: April 13th, 2005, 8:22 pm
Location: UK, London

Re: Scripting Healthpacks that drop on death

Post by Drofder2004 » July 13th, 2011, 8:01 pm

IzNoGoD wrote:
F |Madness| U wrote:Don't need to do rcon, I (client) am the server. I did try rocn anyway though, still get the same "unknown cmd scr_say".
In that case, run it as a dedi server, as setcvar doesnt work on non-dedi servers.
Use /rcon scr_say hello world then.
I run all CoDJumper mod alpha tests on local non-dedi servers, ofcourse setDvar works.

I rechecked the code and noticed what I typed was already in place in your script, my bad...

Can you post the code leading up to the "sayCommand()" being called.
Image
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010

F |Madness| U
CJ G0D!
CJ G0D!
Posts: 1575
Joined: June 3rd, 2009, 9:02 pm
Location: Cardiff University, UK

Re: Scripting Healthpacks that drop on death

Post by F |Madness| U » July 13th, 2011, 8:06 pm

I think it's something extra I have to do with Black Ops. I tested the code on CoD4 and it worked fine. After doing a tiny bit of research I think I have to `Whitelist` my custom dvars. Gonna test it out anyway and see how I get on.

http://wiki.modsrepository.com/index.ph ... ting_Dvars
or
http://wiki.treyarch.com/wiki/CoDBO_Building_A_Mod

Edit: Got it working now, I did have to whitelist the dvars. Although the whitelisting tutorial on the official treyarch wiki doesn't work, typical- but I found a way to get it to work.
-

Nekoneko
CJ Fan
CJ Fan
Posts: 170
Joined: April 18th, 2011, 3:48 pm

Re: Scripting Healthpacks that drop on death

Post by Nekoneko » July 13th, 2011, 8:25 pm

Sounds.. like they made something simple complicated oO

F |Madness| U
CJ G0D!
CJ G0D!
Posts: 1575
Joined: June 3rd, 2009, 9:02 pm
Location: Cardiff University, UK

Re: Scripting Healthpacks that drop on death

Post by F |Madness| U » July 13th, 2011, 8:27 pm

I think its used for some patches they block dvars (unwhitelist?) that can be used in bad ways. Instead they could have just made them cheat protected..
-

User avatar
Drofder2004
Core Staff
Core Staff
Posts: 13313
Joined: April 13th, 2005, 8:22 pm
Location: UK, London

Re: Scripting Healthpacks that drop on death

Post by Drofder2004 » July 13th, 2011, 10:26 pm

forgot yhis was for black ops... whitelisting is moronic... but they need it to protect the 'dedicated' server approach they have.
Image
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010

User avatar
iCYsoldier
CJ Worshipper
CJ Worshipper
Posts: 289
Joined: December 5th, 2009, 7:12 am
Location: Australia

Re: Scripting Healthpacks that drop on death

Post by iCYsoldier » July 16th, 2011, 4:01 am

F |Madness| U wrote:Edit: Got it working now, I did have to whitelist the dvars. Although the whitelisting tutorial on the official treyarch wiki doesn't work, typical- but I found a way to get it to work.
Sorry to bring this thread up again, but how did you get it to work? What's the format of the cfg? Thanks

F |Madness| U
CJ G0D!
CJ G0D!
Posts: 1575
Joined: June 3rd, 2009, 9:02 pm
Location: Cardiff University, UK

Re: Scripting Healthpacks that drop on death

Post by F |Madness| U » July 16th, 2011, 10:08 am

iCYsoldier wrote:
F |Madness| U wrote:Edit: Got it working now, I did have to whitelist the dvars. Although the whitelisting tutorial on the official treyarch wiki doesn't work, typical- but I found a way to get it to work.
Sorry to bring this thread up again, but how did you get it to work? What's the format of the cfg? Thanks
Create Black Ops/mods/yourmod/myWhiteList.cfg (probably don't need that exact name, but to be sure).

Inside that cfg mine looks like

Code: Select all

setmoddvar scr_zom_kickbots
setmoddvar scr_zom_spawnbots
setmoddvar scr_say
Then add the line "raw,myWhiteList.cfg" into the zone source. Compile mod, and lastly in your server config, add the line "exec myWhiteList.cfg" to the bottom. Then start server and just type command as normal.
-

User avatar
iCYsoldier
CJ Worshipper
CJ Worshipper
Posts: 289
Joined: December 5th, 2009, 7:12 am
Location: Australia

Re: Scripting Healthpacks that drop on death

Post by iCYsoldier » July 16th, 2011, 10:37 am

Ah got it now! Thanks alot Madness :)

Post Reply

Who is online

Users browsing this forum: No registered users and 34 guests