Simple Question.

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

Moderator: Core Staff

Dizzy
CJ Fan
CJ Fan
Posts: 143
Joined: May 8th, 2008, 11:45 pm
Location: Colorado, US
Contact:

Re: Simple Question.

Post by Dizzy » May 22nd, 2008, 3:37 pm

Alright, I know what to do from here then. I appriciate all your help drofder. I will be sure to put special thanks to drofder in the script along with YaNo :)


<3 all you guys...
Image
"I am also know as lethal323" - Myself
Xfire = Dizzymagoo

Dizzy
CJ Fan
CJ Fan
Posts: 143
Joined: May 8th, 2008, 11:45 pm
Location: Colorado, US
Contact:

Re: Simple Question.

Post by Dizzy » May 22nd, 2008, 9:00 pm

Alright well I got all the variables working and the hud shows up now but it doesnt update ?

My deaths go up as I die and the number on the hud stays the same.

Another thing is the server doesnt know im alive... It put that sessionstate thing in and it just ignores it and goes around it, lol
Image
"I am also know as lethal323" - Myself
Xfire = Dizzymagoo

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

Re: Simple Question.

Post by Drofder2004 » May 22nd, 2008, 9:23 pm

Since we are now working with the gametype files, it is easy. Scroll down until you find...

Code: Select all

Callback_PlayerKilled(...)
In there, we simply need to tell the mod to update the HuD.

Code: Select all

if(isDefined(attacker.killshud))
   attacker.killshud setValue(attacker.kills);

if(isDefined(self.deathshud))
   self.deathshud setValue(self.deaths);
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

Dizzy
CJ Fan
CJ Fan
Posts: 143
Joined: May 8th, 2008, 11:45 pm
Location: Colorado, US
Contact:

Re: Simple Question.

Post by Dizzy » May 22nd, 2008, 10:13 pm

ok, I got that working now I have a problem where every round(this is SD)the huds reset :x
Image
"I am also know as lethal323" - Myself
Xfire = Dizzymagoo

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

Re: Simple Question.

Post by Drofder2004 » May 22nd, 2008, 10:20 pm

Try changing you "setValue(self.deaths)"

to

setValue(self.pers["deaths"])

Change all isntances of the type:

self.pers["kills"]
self.pers["deaths"]
attacker.pers["kills"]
etc
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

Dizzy
CJ Fan
CJ Fan
Posts: 143
Joined: May 8th, 2008, 11:45 pm
Location: Colorado, US
Contact:

Re: Simple Question.

Post by Dizzy » May 22nd, 2008, 11:22 pm

Alright, I got that problem fixed but now I have another one...


ONE AFTER ANOTHER

If I try to set the value to a dvar Ex. (com_maxfps) it comes up and says its undefined. How I make it so it doesnt? I did this before but I lost the mod and I cant find the coding on the forums any where. I still have a screen shot of the mod :)
Image
"I am also know as lethal323" - Myself
Xfire = Dizzymagoo

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

Re: Simple Question.

Post by Drofder2004 » May 25th, 2008, 3:31 pm

You cannot detect client dvars only server.
I did this in the CoD2 version of CJ mod and although it worked on LAN servers (as technically, the player is the server) when placed online the mod failed to function correctly.

What you are trying, has been tried and will not work.
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

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 16 guests