Page 3 of 3

Re: Scripting Healthpacks that drop on death

Posted: July 13th, 2011, 3:54 pm
by IzNoGoD
/RCON scr_say test

Re: Scripting Healthpacks that drop on death

Posted: July 13th, 2011, 5:49 pm
by F |Madness| U
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".

Re: Scripting Healthpacks that drop on death

Posted: July 13th, 2011, 7:28 pm
by Nekoneko
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.

Re: Scripting Healthpacks that drop on death

Posted: July 13th, 2011, 7:43 pm
by IzNoGoD
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.

Re: Scripting Healthpacks that drop on death

Posted: July 13th, 2011, 8:01 pm
by Drofder2004
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.

Re: Scripting Healthpacks that drop on death

Posted: July 13th, 2011, 8:06 pm
by F |Madness| U
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.

Re: Scripting Healthpacks that drop on death

Posted: July 13th, 2011, 8:25 pm
by Nekoneko
Sounds.. like they made something simple complicated oO

Re: Scripting Healthpacks that drop on death

Posted: July 13th, 2011, 8:27 pm
by F |Madness| U
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..

Re: Scripting Healthpacks that drop on death

Posted: July 13th, 2011, 10:26 pm
by Drofder2004
forgot yhis was for black ops... whitelisting is moronic... but they need it to protect the 'dedicated' server approach they have.

Re: Scripting Healthpacks that drop on death

Posted: July 16th, 2011, 4:01 am
by iCYsoldier
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

Re: Scripting Healthpacks that drop on death

Posted: July 16th, 2011, 10:08 am
by F |Madness| U
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.

Re: Scripting Healthpacks that drop on death

Posted: July 16th, 2011, 10:37 am
by iCYsoldier
Ah got it now! Thanks alot Madness :)