forward InAreaChecker();
OnGameModeINit:
SetTimer("InAreaChecker",1000,1);
public InAreaChecker()
{
for(new i; i<MAX_PLAYERS; i++)
{
if(IsPlayerInArea(i,353.6530,273.3557,-1196.8870,-1131.1132))
{
SendClientMessage(i,COLOR_RED,"Piep");
}
}
return 1;
}
stock IsPlayerInArea(playerid, Float:minx, Float:maxx, Float:miny, 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;
}
Was ist daran falsch?