Thanks - I used g_pCVar->FindVar which returns a ConVar* but its m_pParent
attribute is NULL so I can't get its value.
I tried wrapping it in a ConVarRef and GetInt, GetFloat and GetString all
return 0. I can see that maxplayers is 16 though.

On 25 June 2017 at 21:06, Nicholas Hastings <psycho...@alliedmods.net>
wrote:

> It's the same as getting them from within a game dll.
>
> Call ConnectTier1Libraries or manually look up and set g_pCVar to the
> ICVar interface pointer (CVAR_INTERFACE_VERSION). After then you can use
> ConVarRefs or manual lookup, ex. g_pCVar->FindVar("mp_friendlyfire") .
>
> --
> Nicholas Hastings
> AlliedMods.net <http://www.alliedmods.net>
>
>
>
> > Tom Schumann <mailto:schumann....@gmail.com>
> > Sunday, June 25, 2017 1:31 AM
> > Is there a way to get a game .dll or engine cvar value from a Source
> > plugin? I've had a bit of a poke around and couldn't see or find anything
> > obvious.
> >
> > Thanks
> > _______________________________________________
> > To unsubscribe, edit your list preferences, or view the list archives,
> > please visit:
> > https://list.valvesoftware.com/cgi-bin/mailman/listinfo/hlcoders
> >
>
> _______________________________________________
> To unsubscribe, edit your list preferences, or view the list archives,
> please visit:
> https://list.valvesoftware.com/cgi-bin/mailman/listinfo/hlcoders
>
>
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
https://list.valvesoftware.com/cgi-bin/mailman/listinfo/hlcoders

Reply via email to