Weiß nicht genau obs klappt, aber nen Versuch ists wert, da sich ja kein anderer meldet.
new Float:oldx[MAX_PLAYERS],Float:oldy[MAX_PLAYERS],Float:oldz[MAX_PLAYERS];
forward AFKCheck(playerid);
public AFKCheck(playerid)
{
new Float:x[MAX_PLAYERS],Float:y[MAX_PLAYERS],Float:z[MAX_PLAYERS];
GetPlayerPos(playerid,x[playerid],y[playerid],z[playerid]);
if(x[playerid]==oldx[playerid] && y[playerid] == oldy[playerid] && z[playerid] == oldz[playerid])
{
Kick(playerid);
}
else
{
x[playerid] = oldx[playerid];
y[playerid] = oldy[playerid];
z[playerid] = oldz[playerid];
}
return 1;
}
public OnPlayerConnect(playerid)
{
GetPlayerPos(playerid,oldx[playerid],oldy[playerid],oldz[playerid]);
SetTimerEx("AFKCheck",30000,true,"d",playerid);
return 1;
}