SA-MP Forums Archive
]-[elp safe zone - 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)
+--- Thread: ]-[elp safe zone (/showthread.php?tid=467799)



]-[elp safe zone - huydollar - 05.10.2013

please help me with safe zone,Can make safezone in game


Re: ]-[elp safe zone - Lidor124 - 05.10.2013

What do you mean safezone? explain yourself


Re: ]-[elp safe zone - huydollar - 06.10.2013

Quote:
Originally Posted by Lidor124
Посмотреть сообщение
What do you mean safezone? explain yourself
member go to this safe zone can't be kill


Re: ]-[elp safe zone - DaTa[X] - 06.10.2013

pawn Код:
IsPlayerInArea(playerid, Float:MinX, Float:MinY, Float:MaxX, Float:MaxY)
{
    new Float:X, Float:Y, Float:Z;

    GetPlayerPos(playerid, X, Y, Z);
    if(X >= MinX && X <= MaxX && Y >= MinY && Y <= MaxY) {
        return 1;
    }
    return 0;
}

public OnPlayerUpdate(playerid)
{
   if(IsPlayerInArea(playerid, 0.0, 0.0,0.0,0.0))
      {
          SetPlayerHealth(playerid,0);
       }
    return 1;
}



Re: ]-[elp safe zone - huydollar - 06.10.2013

Quote:
Originally Posted by DaTa[X]
Посмотреть сообщение
pawn Код:
IsPlayerInArea(playerid, Float:MinX, Float:MinY, Float:MaxX, Float:MaxY)
{
    new Float:X, Float:Y, Float:Z;

    GetPlayerPos(playerid, X, Y, Z);
    if(X >= MinX && X <= MaxX && Y >= MinY && Y <= MaxY) {
        return 1;
    }
    return 0;
}

public OnPlayerUpdate(playerid)
{
   if(IsPlayerInArea(playerid, 0.0, 0.0,0.0,0.0))
      {
          SetPlayerHealth(playerid,0);
       }
    return 1;
}
TKS so much