View Single Post
Nomarky
SourceMod Donor
Join Date: Sep 2007
Old 08-19-2008 , 18:57   Re: Query cvar from chat
Reply With Quote #10

How could I use this to return a value with a '.' in it? I tried to get the value of a plugin version:

Code:
         if (StrEqual(text[startidx], "cvars"))
        {
        new Handle:ff = FindConVar("mp_friendlyfire");
        new Handle:cda = FindConVar("cd_announcer_version");
        if (GetConVarInt(ff), (cda))
        {
            PrintToChat(client, "FF is %d", GetConVarInt(ff));
            PrintToChat(client, "CD Announcer Version %d", GetConVarInt(cda));
        }
But it only returns the first number of the plugin version i.e. 2 instead of 2.1. What am I missing here?
Nomarky is offline