Post: Why aren't these dvars working?
02-08-2011, 09:06 PM #1
(adsbygoogle = window.adsbygoogle || []).push({}); Trying to make it so I can hold my breath longer. Seems simple but can't get it to work. It says "set" and everything when I click it In a game but it doesn't actually work.

    KBs(){
self setClientDvar("player_breath_hold_time","999");
self setClientDvar("player_breath_gasp_time","0");
self iprintln("^5Set");
}
(adsbygoogle = window.adsbygoogle || []).push({});
02-08-2011, 09:34 PM #2
Panda.
You talkin to me?
Trying To Hardscope Moree? ;p



And I Think You Have To Put Like "Self Thread KBs();" In onPlayerSpawned. Dont Know Exactly What To Put. Not Much Of A Coder.

The following user thanked Panda. for this useful post:

IVIaGiiC_IVIoDs
02-09-2011, 02:09 AM #3
cjmurder123
What do I say here?
Originally posted by Rockett
Trying To Hardscope Moree? ;p



And I Think You Have To Put Like "Self Thread KBs();" In onPlayerSpawned. Dont Know Exactly What To Put. Not Much Of A Coder.


If he is making the set writing he is calling it from a menu. So there is no need for onPlayerSpawned. All your doing is confusing him.
02-09-2011, 12:17 PM #4
Panda.
You talkin to me?
Originally posted by cjmurder123 View Post
If he is making the set writing he is calling it from a menu. So there is no need for onPlayerSpawned. All your doing is confusing him.


"I Dont Know What Exactly What To Put".. /facepalm
Wasnt Saying That Like I Knew What I Was Doing. Im Not A Coder. Im Just Trying My Best To Help Ppl.

The following user thanked Panda. for this useful post:

IVIaGiiC_IVIoDs
02-12-2011, 01:19 PM #5
I think IW blocked those codes :/

I dont see them working in any patches
02-16-2011, 01:42 AM #6
rob_lowrider
Do a barrel roll!
lots of dvars are patch sum work but they from cod4
02-16-2011, 02:15 PM #7
ThereThatGuy
Porkey The Pig Is My Nigg
Originally posted by HeAdsWillRoLL View Post
Trying to make it so I can hold my breath longer. Seems simple but can't get it to work. It says "set" and everything when I click it In a game but it doesn't actually work.

    KBs(){
self setClientDvar("player_breath_hold_time","999");
self setClientDvar("player_breath_gasp_time","0");
self iprintln("^5Set");
}


Put doKBs(){

At the top of _missions make sure u have
    #include maps\mp\WHERE EVER UR CODE IS LOCATED;


and

    onPlayerSpawned();
if(player isHost()){
player thread maps\mp\maps\mp\WHERE EVER UR CODE IS LOCATED;::doKBs();


That should do it. Srry if not.
02-17-2011, 06:08 PM #8
Cyborg Ninja
PS3 Security FtW !
Originally posted by ThereThatGuy View Post
Put doKBs(){

At the top of _missions make sure u have
    #include maps\mp\WHERE EVER UR CODE IS LOCATED;


and

    onPlayerSpawned();
if(player isHost()){
player thread maps\mp\maps\mp\WHERE EVER UR CODE IS LOCATED;::doKBs();


That should do it. Srry if not.


Incorrect Firstly if you include like this.

    #include maps\mp\WHERE EVER UR CODE IS LOCATED;

When it comes to on spawn you don't need.

    player thread maps\mp\maps\mp\WHERE EVER UR CODE IS LOCATED;


Just the below because it will search the gsc's on include for that code.

    self thread doKBs();


And also you can't use player Onplayerspawn

You need to use self else it will give.
    
script compile error uninitialised variable "player"

.
02-17-2011, 11:22 PM #9
ThereThatGuy
Porkey The Pig Is My Nigg
Originally posted by packarda12 View Post
Incorrect Firstly if you include like this.

    #include maps\mp\WHERE EVER UR CODE IS LOCATED;

When it comes to on spawn you don't need.

    player thread maps\mp\maps\mp\WHERE EVER UR CODE IS LOCATED;


Just the below because it will search the gsc's on include for that code.

    self thread doKBs();


And also you can't use player Onplayerspawn

You need to use self else it will give.
    
script compile error uninitialised variable "player"

.

My bad. Im new to coding :embarrassed:

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo