Text not showing up.
#1

Код:
public Health()
{
  for(new i = 0; i < MAX_PLAYERS; i++)
  {
    if(IsPlayerConnected(i))
    {
      if(PlayerToPoint(3.0,i,2142.3875,-1802.8997,16.1475))// Health 1
      {
        SetPlayerHealth(i, 100);
		SendClientMessage(i, COLOR_GREEN, "Health has been restored ! " );
		return 1;
      }
      if(PlayerToPoint(3.0,i,2042.1116,-1708.4257,13.5547))// Health 2
      {
        SetPlayerHealth(i, 100);
		SendClientMessage(i, COLOR_GREEN, "Health has been restored ! " );
		return 1;
      }
      if(PlayerToPoint(3.0,i,2177.5632,-1585.4856,14.3329))// Health 3
      {
        SetPlayerHealth(i, 100);
		SendClientMessage(i, COLOR_GREEN, "Health has been restored ! " );
		return 1;
      }
      if(PlayerToPoint(3.0,i,2070.6328,-1549.2144,13.43045))// Health 4
      {
        SetPlayerHealth(i, 100);
		SendClientMessage(i, COLOR_GREEN, "Health has been restored ! " );
		return 1;
      }
      if(PlayerToPoint(3.0,i,1963.3553,-1567.2908,13.6109))// Health 5
      {
        SetPlayerHealth(i, 100);
		SendClientMessage(i, COLOR_GREEN, "Health has been restored ! " );
		return 1;
      }
      if(PlayerToPoint(3.0,i,1985.4531,-1780.5994,13.5476))// Health 6
      {
        SetPlayerHealth(i, 100);
		SendClientMessage(i, COLOR_GREEN, "Health has been restored ! " );
		return 1;
      }
      if(PlayerToPoint(3.0,i,1911.3781,-1774.7000,13.3828))// Health 7
      {
        SetPlayerHealth(i, 100);
		SendClientMessage(i, COLOR_GREEN, "Health has been restored ! " );
		return 1;
      }
      if(PlayerToPoint(3.0,i,1759.0837,-1920.6932,13.5732))// Health 8
      {
        SetPlayerHealth(i, 100);
		SendClientMessage(i, COLOR_GREEN, "Health has been restored ! " );
		return 1;
      }
      if(PlayerToPoint(3.0,i,1723.3701,-1839.4691,13.5578))// Health 9
      {
        SetPlayerHealth(i, 100);
		SendClientMessage(i, COLOR_GREEN, "Health has been restored ! " );
		return 1;
      }
      if(PlayerToPoint(3.0,i,1624.4310,-1830.3878,13.5340))// Health 10
      {
        SetPlayerHealth(i, 100);
		SendClientMessage(i, COLOR_GREEN, "Health has been restored ! " );
		return 1;
      }
      if(PlayerToPoint(3.0,i,1434.3492,-1830.8501,13.5469))// Health 11
      {
        SetPlayerHealth(i, 100);
		SendClientMessage(i, COLOR_GREEN, "Health has been restored ! " );
		return 1;
      }
      if(PlayerToPoint(3.0,i,1341.1824,-1820.6444,13.5374))// Health 12
      {
        SetPlayerHealth(i, 100);
		SendClientMessage(i, COLOR_GREEN, "Health has been restored ! " );
		return 1;
      }
      if(PlayerToPoint(3.0,i,1257.9194,-1228.4454,16.0002))// Health 13
      {
        SetPlayerHealth(i, 100);
		SendClientMessage(i, COLOR_GREEN, "Health has been restored ! " );
		return 1;
      }
      if(PlayerToPoint(3.0,i,1172.9626,-1323.2367,15.3983))// Health 14
      {
        SetPlayerHealth(i, 100);
		SendClientMessage(i, COLOR_GREEN, "Health has been restored ! " );
		return 1;
      }
      if(PlayerToPoint(3.0,i,2030.7111,-1405.4629,17.2333))// Health 15
      {
        SetPlayerHealth(i, 100);
		SendClientMessage(i, COLOR_GREEN, "Health has been restored ! " );
		return 1;
      }
      if(PlayerToPoint(3.0,i,1906.8872,-1317.7825,14.1910))// Health 16
      {
        SetPlayerHealth(i, 100);
		SendClientMessage(i, COLOR_GREEN, "Health has been restored ! " );
		return 1;
      }
      if(PlayerToPoint(3.0,i,1971.8868,-1235.3468,20.0518))// Health 17
      {
        SetPlayerHealth(i, 100);
		SendClientMessage(i, COLOR_GREEN, "Health has been restored ! " );
		return 1;
      }
      if(PlayerToPoint(3.0,i,2196.1794,-1185.3987,33.5313))// Health 18
      {
        SetPlayerHealth(i, 100);
		SendClientMessage(i, COLOR_GREEN, "Health has been restored ! " );
		return 1;
      }
      if(PlayerToPoint(3.0,i,2554.0930,-1217.2195,53.7785))// Armor 1
      {
        SetPlayerArmour(i, 100);
		SendClientMessage(i, COLOR_GREEN, "Health has been restored ! " );
		return 1;
      }
      if(PlayerToPoint(3.0,i,2660.3538,-1424.3744,30.4729))// Armor 2
      {
        SetPlayerArmour(i, 100);
		SendClientMessage(i, COLOR_GREEN, "Health has been restored ! " );
		return 1;
      }
      if(PlayerToPoint(3.0,i,2329.5066,-2144.9526,13.5469))// Armor 3
      {
        SetPlayerArmour(i, 100);
		SendClientMessage(i, COLOR_GREEN, "Health has been restored ! " );
		return 1;
      }
      if(PlayerToPoint(3.0,i,1946.6796,-2185.2148,13.5469))// Armor 4
      {
        SetPlayerArmour(i, 100);
		SendClientMessage(i, COLOR_GREEN, "Health has been restored ! " );
		return 1;
      }
    }
  }
  return 1;
}
Okay, so When ever I walk into the point, I get the HP, or Armor I want but, The message don't show up. Can someone fix it please?
Thanks.
Reply
#2

pawn Код:
public Health()
{
  for(new i = 0; i < MAX_PLAYERS; i++)
  {
    if(IsPlayerConnected(i))
    {
      if(PlayerToPoint(3.0,i,2142.3875,-1802.8997,16.1475))// Health 1
      {
        SetPlayerHealth(i, 100);
        SendClientMessage(i, COLOR_GREEN, "Health has been restored ! " );
        return 1;
      }
      else if(PlayerToPoint(3.0,i,2042.1116,-1708.4257,13.5547))// Health 2
      {
        SetPlayerHealth(i, 100);
        SendClientMessage(i, COLOR_GREEN, "Health has been restored ! " );
        return 1;
      }
      else if(PlayerToPoint(3.0,i,2177.5632,-1585.4856,14.3329))// Health 3
      {
        SetPlayerHealth(i, 100);
        SendClientMessage(i, COLOR_GREEN, "Health has been restored ! " );
        return 1;
      }
//ect, ect
see how i changed if to else if after the 1st one, should fix it i cant see anything else wrong. add the rest in aswell.
Reply
#3

Does COLOR_GREEN works in other places?
Reply
#4

Quote:
Originally Posted by MadeMan
Does COLOR_GREEN works in other places?
I wouldn't comply if it wasn't Defined.
Reply
#5

Quote:
Originally Posted by V№ceC№ty
pawn Код:
public Health()
{
  for(new i = 0; i < MAX_PLAYERS; i++)
  {
    if(IsPlayerConnected(i))
    {
      if(PlayerToPoint(3.0,i,2142.3875,-1802.8997,16.1475))// Health 1
      {
        SetPlayerHealth(i, 100);
        SendClientMessage(i, COLOR_GREEN, "Health has been restored ! " );
        return 1;
      }
      else if(PlayerToPoint(3.0,i,2042.1116,-1708.4257,13.5547))// Health 2
      {
        SetPlayerHealth(i, 100);
        SendClientMessage(i, COLOR_GREEN, "Health has been restored ! " );
        return 1;
      }
      else if(PlayerToPoint(3.0,i,2177.5632,-1585.4856,14.3329))// Health 3
      {
        SetPlayerHealth(i, 100);
        SendClientMessage(i, COLOR_GREEN, "Health has been restored ! " );
        return 1;
      }
//ect, ect
see how i changed if to else if after the 1st one, should fix it i cant see anything else wrong. add the rest in aswell.
No the SendClientMessage still doesn't show up when I enter the icons
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)