public IdleKick()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pAdmin] < 1)
{
GetPlayerPos(i, PlayerPos[i][0], PlayerPos[i][1], PlayerPos[i][2]);
if(PlayerPos[i][0] == PlayerPos[i][3] && PlayerPos[i][1] == PlayerPos[i][4] && PlayerPos[i][2] == PlayerPos[i][5])
{
new plname[64];
new string[128];
GetPlayerName(i, plname, sizeof(plname));
format(string, sizeof(string), "AdmCmd: %s wurde von VICI gekickt, Begründung: AFK", plname);
SendClientMessageToAll(COLOR_LIGHTRED, string);
Kick(i);
}
PlayerPos[i][3] = PlayerPos[i][0];
PlayerPos[i][4] = PlayerPos[i][1];
PlayerPos[i][5] = PlayerPos[i][2];
}
}
}
}
Wie schaffe ich es das der Busbot davon nicht betroffen ist ?
Bei mir kommt immer ein ERROR
D:\DOKUME~1\ADMINI~1\Desktop\larp.pwn(43281) : error 017: undefined symbol "playerid"
public IdleKick()
{
if(!IsPlayerNPC(playerid))
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pAdmin] < 1)
{
GetPlayerPos(i, PlayerPos[i][0], PlayerPos[i][1], PlayerPos[i][2]);
if(PlayerPos[i][0] == PlayerPos[i][3] && PlayerPos[i][1] == PlayerPos[i][4] && PlayerPos[i][2] == PlayerPos[i][5])
{
new plname[64];
new string[128];
GetPlayerName(i, plname, sizeof(plname));
format(string, sizeof(string), "AdmCmd: %s wurde von VICI gekickt, Begründung: AFK", plname);
SendClientMessageToAll(COLOR_LIGHTRED, string);
Kick(i);
}
PlayerPos[i][3] = PlayerPos[i][0];
PlayerPos[i][4] = PlayerPos[i][1];
PlayerPos[i][5] = PlayerPos[i][2];
}
}
}
}
mfg Der_Raecher