Second time connecting. - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Second time connecting. (
/showthread.php?tid=68634)
Second time connecting. -
xbatista - 12.03.2009
When player connects
first time to the server it's normal health not - and he is in normal zone,when player
second time connects ,than that zone on him and health going low ://////
P.S. coordinates perfect.
Код:
OnPlayerSpawn : SetTimer("AreaCheck", 200, 1);
public AreaCheck(playerid)
{
new Float:hp;
new Float:counted_health;
counted_health = GetPlayerHealth(playerid, hp) - 1;
if(IsPlayerInArea(playerid,-2989.536, -2942.825, 2989.536, 502.1487))
{
SetPlayerHealth(playerid, counted_health);
}
else if(IsPlayerInArea(playerid, -3001.214, 443.7593, -1331.278, 1634.903))
{
SetPlayerHealth(playerid, counted_health);
}
else if(IsPlayerInArea(playerid, -2989.536, 1623.225, -1576.513, 2977.858))
{
SetPlayerHealth(playerid, counted_health);
}
}