01.06.2012, 08:00
So basically, is it possible for the format to return the proper variable value in the following code? For example, If I have a variable in the server called IsCool[playerid]. I will type "/checkv IsCool" and it will return me what my current value for "IsCool[playerid]" is, and it will work with any variable that exists in the script, please let me know if this is possible and if so, elaborate. Thanks alot!
Код:
format(string1,sizeof(string1),"%s[playerid]",params); // what i typed in the command "/checkv [variable]" format(string2,sizeof(string2),"%d",string1); //Trying to retrieve the value from the "[variable]" format(string3,sizeof(string3),"%s == %d",string1,string2); //Trying to return it to me "[variable] == [value]"