12.07.2016, 14:00
Gostaria de saber se quando a callback nao tiver o parametro playerid, eu posso criar uma variavel de nome playerid pra poder usar esse sistema. Testei o codigo deu certo, sera q pode ocorrer bugs? ou qual melhor forma de fazer isso?
PHP код:
public OnRconLoginAttempt(ip[], password[], success)
{
new name[23], str[50], playerid;
if(!success)
{
GetPlayerName(playerid, name, 23);
format(str, 50, "[ADMIN]: O id: [%i] %s tentou logar na rcon", playerid, name);
for( new i = 0 ; i < MAX_PLAYERS; i++)
{
if( IsPlayerConnected(i) && AdminInfo[i][level] > 0 && AdminInfo[i][level] < 4 )
{
SCM(i, COR_CINZA, str);
}
}
Kick(playerid);
}
return 1;
}