30.04.2014, 11:22
CMD:
Everything works good but it shows :remaining health:1321321 and random numbers....
PHP код:
CMD:listpt(playerid, params[])
{
new online, string[128];
new Float:health;
if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
if(!IsMedic(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You are not an Medic.");
foreach(Player, i)
{
if(IsDead[i])
{
online ++;
}
}
format(string, sizeof(string), "|_____ Patients waiting for trasport _____|");
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
foreach(Player, i)
{
GetPlayerHealth(i,health);
if(IsDead[i])
{
format(string, sizeof(string), " %s ,remaining health:%d ", RPN(i), health);
SendClientMessage(playerid, COLOR_LIME, string);
}
}
return 1;