Sign in to follow this  
Followers 0
Sheep_Wizard

Getting clientDvar

8 posts in this topic

Does anyone know how to get a clients dvar.

 

Iv read that you can use menus but I couldn't get it to work.

 

 

0

Share this post


Link to post
Share on other sites

there is no  way to get a clientdvar in cod4 without some ugly trickery like setting player name to a dvar value

 

the link sentrex gave is for cod black ops only AFAIK

0

Share this post


Link to post
Share on other sites

Is it possible to use 'GetUserinfo' that's in codx to get dvars from players? Also if it is can you use it in a map?

0

Share this post


Link to post
Share on other sites
<player> clientcmd( "setu <dvar> <whatever here; setfromdvar <dvar> " + <dvar you want to get/receive> );

then

return <player> getUserInfo(<dvar you want to get/receive>);

make sure the mod has the clientcmd.menu and clientcmd function.

0

Share this post


Link to post
Share on other sites
<player> clientcmd( "setu <dvar> <whatever here; setfromdvar <dvar> " + <dvar you want to get/receive> );

then

return <player> getUserInfo(<dvar you want to get/receive>);

make sure the mod has the clientcmd.menu and clientcmd function.

 

Could you give an example of how i would use this?

 

I tried this and got error saying it was a unutiised variable

self clientcmd( "setu cg_thirdperson 1; setfromdvar cg_thirdperson" + cg_thirdperson);
return self getUserInfo("cg_thirdperson");
0

Share this post


Link to post
Share on other sites
self clientcmd( "setu sheepwantsdvar undefined; setfromdvar sheepwantsdvar " + cg_thirdperson);
0

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  
Followers 0