There may be a way to convert the integer generated by GetPlayerHealth into a string usable with the SetMessage function so you don't literally have to write it out 100 times. I did some research, but I'm not all that familiar with complicated programming, so you can take a look yourself:
string convertInt(int number)
{
stringstream ss;//create a stringstream
ss << number;//add number to the stream
return ss.str();//return a string with the contents of the stream
}
string convertInt(int number)
{
if (number == 0)
return "0";
string temp="";
string returnvalue="";
while (number>0)
{
temp+=number%10+48;
number/=10;
}
for (int i=0;i<temp.length();i++)
returnvalue+=temp[temp.length()-i-1];
return returnvalue;
}