Posts: 288
Threads: 42
Joined: Jun 2009
Reputation:
0
Yeah, I already tried this. The problem is that it says that I have 0 health.
Posts: 511
Threads: 122
Joined: Jan 2013
pawn Код:
if(!strcmp(cmdtext, "/health"))
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
new Float:hp, string[256];
GetPlayerHealth(playerid, hp);
format(string, sizeof(string), "Health: %d", floatround(hp));
SendClientMessage(i, -1,string);
// PlayerTextDrawSetString(playerid, Textdraw1[playerid], string);
// PlayerTextDrawShow(playerid, Textdraw1[playerid]);
}
}
return 1;
}
Posts: 288
Threads: 42
Joined: Jun 2009
Reputation:
0
Ah yes, floatround turns it into an integer, thanks both.