Getting any variable value with a command
#1

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]"
Reply


Messages In This Thread
Getting any variable value with a command - by serj009 - 01.06.2012, 08:00
Re: Getting any variable value with a command - by iJumbo - 01.06.2012, 08:03
Re: Getting any variable value with a command - by serj009 - 01.06.2012, 08:15
Re: Getting any variable value with a command - by iJumbo - 01.06.2012, 08:17
Re: Getting any variable value with a command - by serj009 - 01.06.2012, 08:28
Re: Getting any variable value with a command - by MadeMan - 01.06.2012, 10:28
Re: Getting any variable value with a command - by Vince - 01.06.2012, 10:38
Re: Getting any variable value with a command - by MadeMan - 01.06.2012, 10:47
Re: Getting any variable value with a command - by milanosie - 01.06.2012, 10:50

Forum Jump:


Users browsing this thread: 1 Guest(s)