-
dvar
How to do dvar which show for example TEXT+player.score?
I tired
self setClientCvar("score", "Score:" + self.score);
It shows nothing.
When I tried this: self setClientCvar("stats_rankn", "Killed");
It showed Killed.
What's wrong?
How it should looks?
-
self setClientCvar("score", "Score:" + self.score);
Make sure self.score is defined;)
-
Maybe try first:
PHP Code:
self setClientCvar("score", "Score:" + 123); // no problem with undefined self.score
-
Are you sure your "self" there actually is a player?
-
-
Just try:
PHP Code:
if (self isPlayer())
self setClientCvar("score", "Score:" + self.score);
else
iprintlnbold("self is not a player, noob!");
-
Quote:
Originally Posted by
kung foo man
Just try:
PHP Code:
if (self isPlayer())
self setClientCvar("score", "Score:" + self.score);
else
iprintlnbold("self is not a player, noob!");
Small correction on the use of isPlayer() function:
PHP Code:
IsPlayer( <entity> )
The way you did it would return the "unknown function" error.
-
I added self setClientCvar("score", "Score:" + self.rank); before thread self.rank from rank file.
-
test with developer 1 and tell us the error