20.11.2013, 09:31
Hello! How do you check whether your health and armour in full in the spelling of command?
CMD:checkhanda(playerid, params[])
{
new Float:Health, Float:Armour;
GetPlayerHealth(playerid, Health);
GetPlayerArmour(playerid, Armour);
if ( Health == 100 && Armour == 100)
{
SendClientMessage(playerid, -1, "You Have Both Health And Armour Full"):
}
else
{
SendClientMessage(playerid, -1, "You Don't Have Your Health And Armour Full");
}
return 1;
}
if(strcmp(cmd, "/check", true) == 0)
{
new string[100];
new Float: AR;
new Float: HP;
GetPlayerArmour(playerid, Float:AR);
GetPlayerHealth(playerid, Float:HP);
format(string, sizeof(string), "Health: %f, Armor: %f",Float:HP, Float: AR);
SendClientMessage(playerid, COLOR_LIGHTGREEN, string);
return 1;
}
if(strcmp(cmd, "/check", true) == 0)
{
new string[100];
new Float: AR;
new Float: HP;
GetPlayerArmour(playerid, Float:AR);
GetPlayerHealth(playerid, Float:HP);
if(AR == 100 && HP == 100);
{
//Command
}
return 1;
}