Код:
public healthy(playerid)
{
if(PlayerInfo[playerid][pOthers] == 0)
{
if(IsPlayerInRangeOfPoint(playerid,20.0,1658.5326,-3886.6897,60.7104))
{
GameTextForPlayer(playerid, "~g~You hear a ringing noice & your health is dropping!",3500,5);
new Float: hp;
GetPlayerHealth(playerid, hp);
SetPlayerHealth(playerid, hp-5);
SetTimerEx("healthy", 4000, false, "i", playerid);
}
else if(IsPlayerInRangeOfPoint(playerid,20.0,1656.0800,-3867.5583,52.9705))
{
GameTextForPlayer(playerid, "~g~You hear a ringing noice & your health is dropping!",3500,5);
new Float: hp;
GetPlayerHealth(playerid, hp);
SetPlayerHealth(playerid, hp-5);
SetTimerEx("healthy", 4000, false, "i", playerid);
}
else if(IsPlayerInRangeOfPoint(playerid,20.0,1653.4971,-3840.3416,37.3747))
{
GameTextForPlayer(playerid, "~g~You hear a ringing noice & your health is dropping!",3500,5);
new Float: hp;
GetPlayerHealth(playerid, hp);
SetPlayerHealth(playerid, hp-5);
SetTimerEx("healthy", 4000, false, "i", playerid);
}
else if(IsPlayerInRangeOfPoint(playerid,20.0,1641.8463,-3819.9185,31.1975))
{
GameTextForPlayer(playerid, "~g~You hear a ringing noice & your health is dropping!",3500,5);
new Float: hp;
GetPlayerHealth(playerid, hp);
SetPlayerHealth(playerid, hp-5);
SetTimerEx("healthy", 4000, false, "i", playerid);
}
else if(IsPlayerInRangeOfPoint(playerid,20.0,1622.8149,-3802.0142,29.7752))
{
GameTextForPlayer(playerid, "~g~You hear a ringing noice & your health is dropping!",3500,5);
new Float: hp;
GetPlayerHealth(playerid, hp);
SetPlayerHealth(playerid, hp-5);
SetTimerEx("healthy", 4000, false, "i", playerid);
}
else if(IsPlayerInRangeOfPoint(playerid,20.0,1610.4227,-3780.5847,32.2803))
{
GameTextForPlayer(playerid, "~g~You hear a ringing noice & your health is dropping!",3500,5);
new Float: hp;
GetPlayerHealth(playerid, hp);
SetPlayerHealth(playerid, hp-5);
SetTimerEx("healthy", 4000, false, "i", playerid);
}
else if(IsPlayerInRangeOfPoint(playerid,20.0,1609.8184,-3750.0193,45.0269))
{
GameTextForPlayer(playerid, "~g~You hear a ringing noice & your health is dropping!",3500,5);
new Float: hp;
GetPlayerHealth(playerid, hp);
SetPlayerHealth(playerid, hp-5);
SetTimerEx("healthy", 4000, false, "i", playerid);
}
}
return 1;
}
That is on the OnPlayerSpawn, but its still not working.