|
Originally Posted by Andres_Garcia
Lo que pasa es que el sistema de anti afk que tengo kickea algunos bot, quisiera saber como puedo aser para que no los kickeara sin sacar el sistema de anti afk
PD: y busco ayuda de alguien que sepa ocupar bien el sitema de dialog d=D |
public IdleKick()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pAdmin] < 1)
{
if (IsPlayerNPC(playerid))
{
}
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), "Server: %s has sido kickeado del servidor, Razon: 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];
}
}
}
}
public IdleKick()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerNPC(i)) return 1;
else 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), "Server: %s has sido kickeado del servidor, Razon: 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];
}
}
}
}
|
C:\Documents and Settings\Bluegamez\Escritorio\Los Andes\gamemodes\larp.pwn(46166) : warning 209: function "IdleKick" should return a value Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase Header size: 10244 bytes Code size: 1760852 bytes Data size: 10559328 bytes Stack/heap size: 16384 bytes; estimated max. usage=4210 cells (16840 bytes) Total requirements:12346808 bytes 1 Warning. |
|
Originally Posted by Andres_Garcia
Hey me tira este erro Y_Y
Quote:
|

public IdleKick()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerNPC(i)) return 1;
else 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), "Administrador: %s has sido kickeado del servidor, Razon: 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];
}
}
}
}
return 1;
C:\Documents and Settings\Bluegamez\Escritorio\Los Andes\gamemodes\larp.pwn(46165) : warning 209: function "IdleKick" should return a value
C:\Documents and Settings\Bluegamez\Escritorio\Los Andes\gamemodes\larp.pwn(46166) : error 054: unmatched closing brace ("}")
C:\Documents and Settings\Bluegamez\Escritorio\Los Andes\gamemodes\larp.pwn(46167) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
2 Errors.
public IdleKick()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pAdmin] < 1 && !IsPlayerNPC(playerid))
{
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), "Server: %s has sido kickeado del servidor, Razon: 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];
}
}
}
}