I use Shadow Heekz One
Add These Two in Public's
public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
{
new Float:oldposx, Float:oldposy, Float:oldposz;
new Float:tempposx, Float:tempposy, Float:tempposz;
GetPlayerPos(playerid, oldposx, oldposy, oldposz);
tempposx = (oldposx -x);
tempposy = (oldposy -y);
tempposz = (oldposz -z);
if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
{
return 1;
}
return 0;
}
and
public MapBounds()
{
for(new i = 0; i <= MAX_PLAYERS; i++) if(IsPlayerConnected(i) == 1) {
if(!PlayerToPoint(50,i,1780.2505,1588.6793,-304.5052,-86.6157)){
if(PlayerInfo[i][Spawned] == 1) {
SetPlayerPos(i,1780.2505,1588.6793,-304.5052,-86.6157,1.00,0);
}
}
}
At GameModeInit
SetTimer("MapBounds",15s00,0);