Errors while compiling
#10

Код:
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)
{
    new string[128];
    if(!IsPlayerInArea(playerid, 100.634521, 1807.748657,17.640625, 387.805206, 2078.654296,17.648149))
    if(IsPlayerAdmin(playerid))
	{
        SetPlayerHealth(playerid, 100);
	}
    else
   {
    if(!IsPlayerInArea(playerid, 100.634521, 1807.748657,17.640625, 387.805206, 2078.654296,17.648149))
    SetPlayerHealth(playerid, 0);
    format(string,sizeof(string),"[DEATH] %s(%d) has been killed for entering a secret place.",PlayerName(playerid),playerid);
    SendClientMessageToAll(COLOR_PINK,string);
    }
	return 1;
 }
Okay, i tried to get it working but now it kills everyone on spawn unless they aren't logged in to rcon?
Reply


Messages In This Thread
Errors while compiling - by Uvais - 04.09.2017, 13:08
Re: Errors while compiling - by kAn3 - 04.09.2017, 13:17
Re: Errors while compiling - by Vince - 04.09.2017, 13:18
Re: Errors while compiling - by Uvais - 04.09.2017, 13:24
Re: Errors while compiling - by crukk11 - 04.09.2017, 13:27
Re: Errors while compiling - by Uvais - 04.09.2017, 13:29
Re: Errors while compiling - by crukk11 - 04.09.2017, 13:32
Re: Errors while compiling - by Uvais - 04.09.2017, 13:33
Re: Errors while compiling - by Uvais - 04.09.2017, 13:35
Re: Errors while compiling - by Uvais - 04.09.2017, 14:12

Forum Jump:


Users browsing this thread: 1 Guest(s)