Color in a format string
#4

You could also, for a little memory optimization(I think), get rid of "string2" and put
pawn Код:
(GetPVarInt(id, string)) ? ("{33FF33}Completed") : ("{FF3333}Not Completed")
right where you use the string2

example:
pawn Код:
//instead of
new string[x];
string = (GetPVarInt(id, string)) ? ("{33FF33}Completed") : ("{FF3333}Not Completed");  
SendClientMessage(playerid, -1, string);

//do
SendClientMessage(playerid, -1, (GetPVarInt(id, string)) ? ("{33FF33}Completed") : ("{FF3333}Not Completed"));
Its a little better (In my option) as it takes less space and doesn't use that "little" heap size, but if you're using the value twice I think using a string will be better, as you don't have to get the value twice..
Reply


Messages In This Thread
Color in a format string - by morris91 - 19.09.2015, 18:13
Re: Color in a format string - by jlalt - 19.09.2015, 18:30
Re: Color in a format string - by Vince - 19.09.2015, 22:12
Re: Color in a format string - by xVIP3Rx - 20.09.2015, 04:31

Forum Jump:


Users browsing this thread: 1 Guest(s)