if(strcmp(cmd, "/heal", true) == 0)
{
tmp = strtok(cmdtext, idx);
GetPlayerName(playerid, sendername, sizeof(sendername));
new location = PlayerInfo[playerid][pLocal];
if(!strlen(tmp))
{
if(location != 255)
{
if(location < 99)
{
if(HouseInfo[location][hArm] == 1)
{
SetPlayerArmour(playerid, 100.0);
PlayerPlaySound(playerid, 1150, 0.0, 0.0, 0.0);
format(string, sizeof(string), "You have been healed to 100 armor");
SendClientMessage(playerid, TEAM_GREEN_COLOR,string);
}
else
{
format(string, sizeof(string), "This place does not have armour upgrades");
SendClientMessage(playerid, TEAM_GREEN_COLOR,string);
}
if(HouseInfo[location][hHel] == 1)
{
new Float:tempheal;
GetPlayerHealth(playerid,tempheal);
if ( tempheal < 100.0)
{
SetPlayerHealth(playerid,100.0);
PlayerPlaySound(playerid, 1150, 0.0, 0.0, 0.0);
format(string, sizeof(string), "You have been healed to 100 health");
SendClientMessage(playerid, TEAM_GREEN_COLOR,string);
}
else
{
SendClientMessage(playerid, TEAM_GREEN_COLOR,"You are alredy healed to 100");
}
}
else
{
format(string, sizeof(string), "This place does not have healing upgrades");
SendClientMessage(playerid, TEAM_GREEN_COLOR,string);
}
return 1;
}
else
{
if(BizzInfo[location-99][bArm] == 1)
{
SetPlayerArmour(playerid,100.0);
PlayerPlaySound(playerid, 1150, 0.0, 0.0, 0.0);
format(string, sizeof(string), "You have been healed to 100 armor");
SendClientMessage(playerid, TEAM_GREEN_COLOR,string);
}
else
{
format(string, sizeof(string), "This place does not have armour upgrades");
SendClientMessage(playerid, TEAM_GREEN_COLOR,string);
}
if(BizzInfo[location-99][bHel] == 1)
{
new Float:tempheal;
GetPlayerHealth(playerid,tempheal);
if ( tempheal < 100.0)
{
SetPlayerHealth(playerid,100.0);
PlayerPlaySound(playerid, 1150, 0.0, 0.0, 0.0);
format(string, sizeof(string), "You have been healed to 100 health");
SendClientMessage(playerid, TEAM_GREEN_COLOR,string);
}
else
{
SendClientMessage(playerid, TEAM_GREEN_COLOR,"You are alredy healed to 100");
}
}
else
{
format(string, sizeof(string), "This place does not have healing upgrades");
SendClientMessage(playerid, TEAM_GREEN_COLOR,string);
}
return 1;
|
SetTimer("HealCheck",3000000,0); |