GetMyHp Commands
#1

I got this codes:

if(strcmp(cmd, "/myhp", true) == 0) // Reboot the server
{
SendClientMessage(playerid,COLOR_YELLOW, GetPlayerHealth);

}

But i got an error in SendClientMessage(playerid,COLOR_YELLOW, GetPlayerHealth);

Why?
Reply
#2

Try that:
Код:
new Float:health;
GetPlayerHealth(playerid,health);
Reply
#3

i got a error

SendClientMessage(playerid,COLOR_YELLOW, GetPlayerHealth(playerid);
Reply
#4

Quote:
Originally Posted by Smiths
i got a error

SendClientMessage(playerid,COLOR_YELLOW, GetPlayerHealth(playerid);
Look again at my post.
Reply
#5

You need to make a new string and format that string to had the player's health in it with the float escape code. Wiki.sa-mp.com can tell you what you need on those functions.
Reply
#6

You mean something like this?

Код:
new string[256];
new Float:health;
GetPlayerHealth(playerid,health);
format(string,sizeof(string),"Your health: %f",health);
SendClientMessage(playerid,COLOR_YELLOW,string);
Reply
#7

Quote:
Originally Posted by Programie
You mean something like this?

Код:
new string[256];
new Float:health;
GetPlayerHealth(playerid,health);
format(string,sizeof(string),"Your health: %f",health);
SendClientMessage(playerid,COLOR_YELLOW,string);
Lol ... http://forum.sa-mp.com/index.php?top...7347#msg507347
He needs string with MAXIMUM 25 cells and you would sell him string with 256

pawn Код:
new string[25];
new Float:health;
GetPlayerHealth(playerid,health);
format(string,sizeof(string),"Your health: %f",health);
SendClientMessage(playerid,COLOR_YELLOW,string);
Reply
#8

try this:

Код:
 if(strcmp(cmd, "/myhp", true) == 0) // Reboot the server
  {
   SendClientMessage(playerid,COLOR_YELLOW, "GetPlayerHealth");

  }
Reply
#9

Quote:
Originally Posted by Criss_Angel
try this:

Код:
 if(strcmp(cmd, "/myhp", true) == 0) // Reboot the server
 {
   SendClientMessage(playerid,COLOR_YELLOW, "GetPlayerHealth");

 }
LOL
Reply
#10

So you want to get your health?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)