How can I do that?
#3

Quote:
Originally Posted by Kaperstone
Посмотреть сообщение
Use the `i` as an indicator to the current stage and conditional statement to know what i equals to, if it equals to any i, make it send the message with the color formatted in HEX between {}
Something like so
pawn Код:
if(i==3) SendClientMessage(playerid, COLOR_RED);
like this?

Код:
CMD:reports(playerid, params) {
         for(new i; i < MAX_REPORTS; ++i)
         {
	         if(Reports[i][reportValide]) {
                       format(string, sizeof(string), "Report: %s", Reports[i][reportDetails]);
	              if(i==0) SCM(playerid, COLOR_YELLOW, string);
	              if(i==1) SCM(playerid, COLOR_BLUE, string);
	              if(i==2) SCM(playerid, COLOR_YELLOW, string);
	              if(i==3) SCM(playerid, COLOR_BLUE, string);
                 }
          }
 return 1;
}
Reply


Messages In This Thread
How can I do that? - by None1337 - 14.12.2017, 10:58
Re: How can I do that? - by Kaperstone - 14.12.2017, 11:10
Re: How can I do that? - by None1337 - 14.12.2017, 11:27
Re: How can I do that? - by MEW273 - 14.12.2017, 11:47
Re: How can I do that? - by None1337 - 14.12.2017, 13:45
Re: How can I do that? - by Konstantinos - 14.12.2017, 14:28

Forum Jump:


Users browsing this thread: 1 Guest(s)