SetSvarString info
#1

Hello, i have this code:

Код:
new TimeString[64];
        format(TimeString,sizeof(TimeString),"%02d:%02d",GameMinutes,GameSeconds);
To show game time left until next game, i wanna save it in SetSVarString for using later for my own, i tried with:


Код:
SetSVarString("TimeLeft", "%02d:%02d",GameMinutes,GameSeconds);
But got "argument doesn't match definitions".

Is possible to pass a string with SetSvarString? How?
Reply
#2

You have to format it..like:

PHP код:
new tmp[32];
format(tmp,sizeof(tmp),"%02d:%02d",GameMinutes,GameSeconds);
SetSVarString("TimeLeft"tmp); 
Reply
#3

Oh, thanks
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)