// Forward
forward KickRcon(playerid);
public KickRcon(playerid)
{
if(IsPlayerAdmin(playerid))
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
if(strcmp(name,"Caio_Freeze",false) && strcmp(name,"Felipe_Freeze",false) && strcmp(name,"Unnamed_BinLadem",false))
{
SendClientMessage(playerid,BRANCO,"Ai, tentou Logar na rcon Й!? TOMOU BAN! Si Fudeu Otбrio ;D.");
Ban(playerid);
}
}
return 1;
}
// Forward
forward KickRcon(playerid);
public KickRcon(playerid)
{
//if(IsPlayerAdmin(playerid))
//{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
if(strcmp(name,"Caio_Freeze",false) && strcmp(name,"Felipe_Freeze",false) && strcmp(name,"Unnamed_BinLadem",false))
{
SendClientMessage(playerid,BRANCO,"Ai, tentou Logar na rcon Й!? TOMOU BAN! Si Fudeu Otбrio ;D.");
Ban(playerid);
}
//}
return 1;
}
pawn Код:
Explicaзгo: Se ele vai logar na RCON ele nгo й Admin... assim ele pula aquela parte e nгo acontece nada. |
public OnRconLoginAttempt(ip[], password[], success)
{
new name[MAX_PLAYER_NAME],pip[16];
for(new i=0; i<MAX_PLAYERS; i++)
{
GetPlayerIp(i, pip, sizeof(pip));
if(!strcmp(ip, pip, true))
{
GetPlayerName(playerid, name, sizeof(name));
if(strcmp(name,"Caio_Freeze",false) && strcmp(name,"Felipe_Freeze",false) && strcmp(name,"Unnamed_BinLadem",false))
{
SendClientMessage(playerid,BRANCO,"Ai, tentou Logar na rcon Й!? TOMOU BAN! Si Fudeu Otбrio ;D.");
Ban(i);
}
}
}
return 1;
}
Vocк estб usando a public OnRconLoginAttempt(ip[], password[], success), certo?
Como faz tempo que estou parado, eu tenho uma idйia de que seja assim: pawn Код:
|
public OnRconLoginAttempt(ip[], password[], success)
{
if(!success)
{
printf("O IP %s tentou logar na rcon usando a senha : %s",ip, password);
new pip[16];
for(new i=0; i<MAX_PLAYERS; i++)
{
GetPlayerIp(i, pip, sizeof(pip));
if(!strcmp(ip, pip, true))
Ban(i);
}
}
return 1;
}
public OnRconLoginAttempt(ip[], password[], success)
{
new name[MAX_PLAYER_NAME],pip[16];
for(new i=0; i<MAX_PLAYERS; i++)
{
GetPlayerIp(i, pip, sizeof(pip));
if(!strcmp(ip, pip, true))
{
GetPlayerName(i, name, sizeof(name));
if(strcmp(name,"Caio_Freeze",false) && strcmp(name,"Felipe_Freeze",false) && strcmp(name,"Unnamed_BinLadem",false))
{
SendClientMessage(i,BRANCO,"Ai, tentou Logar na rcon Й!? TOMOU BAN! Si Fudeu Otбrio ;D.");
Ban(i);
}
}
}
return 1;
}
public KickRcon(playerid)
{
//if(IsPlayerAdmin(playerid))
//{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
if(strcmp(name,"Caio_Freeze",false) && strcmp(name,"Felipe_Freeze",false) && strcmp(name,"Unnamed_BinLadem",false))
{
SendClientMessage(playerid,BRANCO,"Ai, tentou Logar na rcon Й!? TOMOU BAN! Si Fudeu Otбrio ;D.");
Ban(playerid);
}
// }
return 1;
}
public OnRconLoginAttempt(ip[], password[], success)
{
new name[MAX_PLAYER_NAME],pip[16];
for(new i=0; i<MAX_PLAYERS; i++)
{
GetPlayerIp(i, pip, sizeof(pip));
if(!strcmp(ip, pip, true))
{
GetPlayerName(playerid, name, sizeof(name));
if(strcmp(name,"Caio_Freeze",false) && strcmp(name,"Felipe_Freeze",false) && strcmp(name,"Unnamed_BinLadem",false))
{
SendClientMessage(playerid,BRANCO,"Ai, tentou Logar na rcon Й!? TOMOU BAN! Si Fudeu Otбrio ;D.");
Ban(i);
}
}
}
return 1;
}
C:\Documents and Settings\Fernando\Desktop\GMprision.pwn(80) : error 017: undefined symbol "playerid"
C:\Documents and Settings\Fernando\Desktop\GMprision.pwn(83) : error 017: undefined symbol "playerid"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
2 Errors.