13.05.2013, 03:22
Erro de um FS de bantemp
FS:
Код:
C:\Users\Huug\Desktop\bantemp.pwn(84) : error 017: undefined symbol "strtok" C:\Users\Huug\Desktop\bantemp.pwn(84) : error 033: array must be indexed (variable "tmp") C:\Users\Huug\Desktop\bantemp.pwn(90) : error 017: undefined symbol "ReturnUser" C:\Users\Huug\Desktop\bantemp.pwn(104) : error 017: undefined symbol "strtok" C:\Users\Huug\Desktop\bantemp.pwn(104) : error 033: array must be indexed (variable "tmp") C:\Users\Huug\Desktop\bantemp.pwn(136) : error 017: undefined symbol "BanLog" C:\Users\Huug\Desktop\bantemp.pwn(210) : error 017: undefined symbol "OnPlayerSave" C:\Users\Huug\Desktop\bantemp.pwn(211) : error 017: undefined symbol "BanTemp" C:\Users\Huug\Desktop\bantemp.pwn(225) : error 029: invalid expression, assumed zero C:\Users\Huug\Desktop\bantemp.pwn(225) : error 004: function "CheckDesbanAuto" is not implemented C:\Users\Huug\Desktop\bantemp.pwn(272) : warning 225: unreachable code C:\Users\Huug\Desktop\bantemp.pwn(272) : error 029: invalid expression, assumed zero C:\Users\Huug\Desktop\bantemp.pwn(273) : error 029: invalid expression, assumed zero C:\Users\Huug\Desktop\bantemp.pwn(274) : error 001: expected token: ";", but found "{" C:\Users\Huug\Desktop\bantemp.pwn(275) : warning 219: local variable "string" shadows a variable at a preceding level C:\Users\Huug\Desktop\bantemp.pwn(356) : warning 225: unreachable code C:\Users\Huug\Desktop\bantemp.pwn(356) : error 029: invalid expression, assumed zero C:\Users\Huug\Desktop\bantemp.pwn(357) : error 029: invalid expression, assumed zero C:\Users\Huug\Desktop\bantemp.pwn(358) : error 001: expected token: ";", but found "{" C:\Users\Huug\Desktop\bantemp.pwn(359) : warning 219: local variable "string" shadows a variable at a preceding level C:\Users\Huug\Desktop\bantemp.pwn(456) : warning 225: unreachable code C:\Users\Huug\Desktop\bantemp.pwn(456) : error 029: invalid expression, assumed zero C:\Users\Huug\Desktop\bantemp.pwn(456) : error 017: undefined symbol "BanLog" C:\Users\Huug\Desktop\bantemp.pwn(466) : error 029: invalid expression, assumed zero C:\Users\Huug\Desktop\bantemp.pwn(466) : error 004: function "CheckDesbanAuto" is not implemented C:\Users\Huug\Desktop\bantemp.pwn(467) : error 029: invalid expression, assumed zero C:\Users\Huug\Desktop\bantemp.pwn(467) : error 004: function "CheckDesbanAuto" is not implemented C:\Users\Huug\Desktop\bantemp.pwn(73) : warning 203: symbol is never used: "moneys" C:\Users\Huug\Desktop\bantemp.pwn(70) : warning 204: symbol is assigned a value that is never used: "plname" C:\Users\Huug\Desktop\bantemp.pwn(69) : warning 204: symbol is assigned a value that is never used: "playername" C:\Users\Huug\Desktop\bantemp.pwn(717) : error 001: expected token: "#endif", but found "-end of file-" C:\Users\Huug\Desktop\bantemp.pwn(717) : warning 203: symbol is never used: "DOF2_Exit"
pawn Код:
#include <a_samp>
#include <dof2>
#pragma tabsize 0
#if defined FILTERSCRIPT
public OnFilterScriptExit()
{
DOF2_Exit();
return 1;
}
#else
main()
{
print("\n----------------------------------");
print(" Blank Gamemode by your name here");
print("----------------------------------\n");
}
#define QQIssoNovinha SendClientMessage(playerid, COLOR_GRAD1, " Vocк nгo pode usar este comando!")
enum pInfo{pDiaBanTemp, pMesBanTemp, pAnoBanTemp, pAdmin, pNick, pMotivo, pAdmBan, pData, pHora };
new PlayerInfo[MAX_PLAYERS][pInfo];
enum BlInfo{
pMotivo[126],
pAdmBan[MAX_PLAYER_NAME],
pData[20],
pHora[20],
BanDia[20],
BanMes[20],
BanAno[20],
BanSegundo[20],
BanHora[20],
BanMinuto[20],
pNick[64]};
new BanInfo[MAX_PLAYERS][BlInfo];
new NaoPodeLogar[MAX_PLAYERS];
new FoiDesban[MAX_PLAYERS];
new sendername[MAX_PLAYER_NAME];
new year;
new month;
new day;
forward CheckDesbanAuto(playerid);
forward ClearChatbox(playerid, lines);
#define COLOR_GRAD2 0xBFC0C2FF
#define COLOR_GRAD1 0xBFC0C2FF
#define COLOR_LIGHTRED 0xFF6347AA
public OnPlayerCommandText(playerid, cmdtext[])
{
//=======
new string[256];
new giveplayer[MAX_PLAYER_NAME];
new playername[MAX_PLAYER_NAME];
new plname[MAX_PLAYER_NAME];
new cmd[256];
new tmp[256];
new giveplayerid, moneys, idx;
//==
if(strcmp(cmd, "/bantemp", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /bantemp [id] [dias] [motivo]");
return true;
}
giveplayerid = ReturnUser(tmp);
if (PlayerInfo[playerid][pAdmin] >= 1)
{
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
if(PlayerInfo[giveplayerid][pAdmin] >= 3001)
{
SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo pode banir este admin!");
return true;
}
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /bantemp [id] [dias] [motivo]");
return true;
}
new diasban = strval(tmp);
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /bantemp [id] [dias] [motivo]");
return true;
}
getdate(year, month, day);
if(diasban > 9999)
{
SendClientMessage(playerid, COLOR_GRAD1, "[ERRO] Vocк definiu muitos dias!");
return 1;
}
format(string, sizeof(string), "AdmCmd: %s foi banido temporariamente (%d dias) por %s, Motivo: %s (%d-%d-%d)", giveplayer, diasban, sendername, (result),day,month,year);
BanLog(string);
format(string, sizeof(string), "AdmCmd: %s foi banido temporariamente (%d dias) por %s, Motivo: %s", giveplayer, diasban, sendername, (result));
SendClientMessageToAll(COLOR_LIGHTRED, string);
PlayerInfo[giveplayerid][pDiaBanTemp] = day+diasban;
PlayerInfo[giveplayerid][pMesBanTemp] = month;
PlayerInfo[giveplayerid][pAnoBanTemp] = year;
for(new dias = 1; dias < diasban; dias++)
{
if(PlayerInfo[giveplayerid][pMesBanTemp] == 1 && PlayerInfo[giveplayerid][pDiaBanTemp] > 31)
{
PlayerInfo[giveplayerid][pDiaBanTemp] -= 31;
PlayerInfo[giveplayerid][pMesBanTemp]++;
}
if(PlayerInfo[giveplayerid][pMesBanTemp] == 2 && PlayerInfo[giveplayerid][pDiaBanTemp] > 28)
{
PlayerInfo[giveplayerid][pDiaBanTemp] -= 28;
PlayerInfo[giveplayerid][pMesBanTemp]++;
}
if(PlayerInfo[giveplayerid][pMesBanTemp] == 3 && PlayerInfo[giveplayerid][pDiaBanTemp] > 31)
{
PlayerInfo[giveplayerid][pDiaBanTemp] -= 31;
PlayerInfo[giveplayerid][pMesBanTemp]++;
}
if(PlayerInfo[giveplayerid][pMesBanTemp] == 4 && PlayerInfo[giveplayerid][pDiaBanTemp] > 30)
{
PlayerInfo[giveplayerid][pDiaBanTemp] -= 30;
PlayerInfo[giveplayerid][pMesBanTemp]++;
}
if(PlayerInfo[giveplayerid][pMesBanTemp] == 5 && PlayerInfo[giveplayerid][pDiaBanTemp] > 31)
{
PlayerInfo[giveplayerid][pDiaBanTemp] -= 31;
PlayerInfo[giveplayerid][pMesBanTemp]++;
}
if(PlayerInfo[giveplayerid][pMesBanTemp] == 6 && PlayerInfo[giveplayerid][pDiaBanTemp] > 30)
{
PlayerInfo[giveplayerid][pDiaBanTemp] -= 30;
PlayerInfo[giveplayerid][pMesBanTemp]++;
}
if(PlayerInfo[giveplayerid][pMesBanTemp] == 7 && PlayerInfo[giveplayerid][pDiaBanTemp] > 31)
{
PlayerInfo[giveplayerid][pDiaBanTemp] -= 31;
PlayerInfo[giveplayerid][pMesBanTemp]++;
}
if(PlayerInfo[giveplayerid][pMesBanTemp] == 8 && PlayerInfo[giveplayerid][pDiaBanTemp] > 31)
{
PlayerInfo[giveplayerid][pDiaBanTemp] -= 31;
PlayerInfo[giveplayerid][pMesBanTemp]++;
}
if(PlayerInfo[giveplayerid][pMesBanTemp] == 9 && PlayerInfo[giveplayerid][pDiaBanTemp] > 30)
{
PlayerInfo[giveplayerid][pDiaBanTemp] -= 30;
PlayerInfo[giveplayerid][pMesBanTemp]++;
}
if(PlayerInfo[giveplayerid][pMesBanTemp] == 10 && PlayerInfo[giveplayerid][pDiaBanTemp] > 31)
{
PlayerInfo[giveplayerid][pDiaBanTemp] -= 31;
PlayerInfo[giveplayerid][pMesBanTemp]++;
}
if(PlayerInfo[giveplayerid][pMesBanTemp] == 11 && PlayerInfo[giveplayerid][pDiaBanTemp] > 30)
{
PlayerInfo[giveplayerid][pDiaBanTemp] -= 30;
PlayerInfo[giveplayerid][pMesBanTemp]++;
}
if(PlayerInfo[giveplayerid][pMesBanTemp] == 12 && PlayerInfo[giveplayerid][pDiaBanTemp] > 31)
{
PlayerInfo[giveplayerid][pDiaBanTemp] -= 31;
PlayerInfo[giveplayerid][pMesBanTemp]++;
}
if(PlayerInfo[giveplayerid][pMesBanTemp] > 12)
{
PlayerInfo[giveplayerid][pMesBanTemp] -= 12;
PlayerInfo[giveplayerid][pAnoBanTemp]++;
}
}
OnPlayerSave(giveplayerid);
BanTemp(giveplayerid, result, PlayerName(playerid));
return true;
}
}//not connected
}
else
{
QQIssoNovinha;
}
}
return true;
}
public CheckDesbanAuto(playerid)
{
new string3[128];
new string4[128];
new ANO, MES, DIA;
new ip[16];
GetPlayerIp(playerid, ip, sizeof ip);
format(string3, sizeof(string3), "BanidosTemp/%s.ini", PlayerName(playerid));
format(string4, sizeof(string4), "IPsBanidosTemp/%s.ini", ip);
if(fexist(string3))
{
getdate(ANO, MES, DIA);
if(DIA >= PlayerInfo[playerid][pDiaBanTemp] && MES >= PlayerInfo[playerid][pMesBanTemp] && ANO >= PlayerInfo[playerid][pAnoBanTemp])
{
DOF2_RemoveFile(string3);
FoiDesban[playerid] = 1;
NaoPodeLogar[playerid] = 0;
if(fexist(string4))
{
NaoPodeLogar[playerid] = 0;
DOF2_RemoveFile(string4);
}
}
else
{
NaoPodeLogar[playerid] = 1;
ForceClassSelection(playerid);
SetTimerEx("BanAuto2", 1300, 0, "i", playerid);
}
}
else
{
NaoPodeLogar[playerid] = 0;
}
if(fexist(string4))
{
NaoPodeLogar[playerid] = 1;
ForceClassSelection(playerid);
SetTimerEx("BanAuto2", 1300, 0, "i", playerid);
}
else
{
NaoPodeLogar[playerid] = 0;
}
return true;
}
forward BanAuto(playerid);
public BanAuto(playerid)
{
new string[128];
new DialogBPH[1500];
new string3[128];
new string4[128];
new ip[16];
GetPlayerIp(playerid, ip, sizeof ip);
//format(string3, sizeof(string3), "IPsBanidos/%s.ini", ip);
format(string3, sizeof(string3), "Banidos/%s.ini", PlayerName(playerid));
if(fexist(string3)) //autoban
{
strmid(BanInfo[playerid][pMotivo], DOF2_GetString(string3,"Motivo"), 0, strlen(DOF2_GetString(string3,"Motivo")), 255);
strmid(BanInfo[playerid][pAdmBan], DOF2_GetString(string3,"Admin"), 0, strlen(DOF2_GetString(string3,"Admin")), 255);
strmid(BanInfo[playerid][pData], DOF2_GetString(string3,"Data"), 0, strlen(DOF2_GetString(string3,"Data")), 255);
strmid(BanInfo[playerid][pHora], DOF2_GetString(string3,"Hora"), 0, strlen(DOF2_GetString(string3,"Hora")), 255);
format(string, 128, "{FF0000}Vocк estб Banido do Servidor.\n\n", PlayerName(playerid));
strcat(DialogBPH,string);
format(string, 128, "{FFFFFF}*******[INFORMAЗХES]*******\n\n", PlayerName(playerid));
strcat(DialogBPH,string);
format(string, sizeof(string), "{00FFFF}Nick: %s\n\n", PlayerName(playerid));
strcat(DialogBPH,string);
format(string, sizeof(string), "{00FFFF}IP: %s\n\n", ip);
strcat(DialogBPH,string);
format(string, sizeof(string), "{00FFFF}Motivo: %s\n\n", BanInfo[playerid][pMotivo]);
strcat(DialogBPH,string);
format(string, sizeof(string), "{00FFFF}Admin: %s\n\n", BanInfo[playerid][pAdmBan]);
strcat(DialogBPH,string);
format(string, sizeof(string), "{00FFFF}Dia: %s\n\n", BanInfo[playerid][pData]);
strcat(DialogBPH,string);
format(string, sizeof(string), "{00FFFF}Hora: %s\n\n", BanInfo[playerid][pHora]);
strcat(DialogBPH,string);
format(string, sizeof(string), "{00FFFF}Data Desban: {FF0000}PERMANENTE\n\n", BanInfo[playerid][pHora]);
strcat(DialogBPH,string);
format(string, 128, "{FFFFFF}************************************\n", PlayerName(playerid));
strcat(DialogBPH,string);
format(string, sizeof(string), "{FF0000}Obs: Para fazer uma revisгo acesse\n{FFFFFF}www.gameliveforever.forumeiros.com");
strcat(DialogBPH,string);
ShowPlayerDialog(playerid, 8723, DIALOG_STYLE_MSGBOX, "{FFFFFF}Informaзхes do ban", DialogBPH, "Sair", "");
//Kick(playerid);
SetTimerEx("KickBanido", 10000, 0, "i", playerid);
NaoPodeLogar[playerid] = 1;
return true;
}
format(string4, sizeof(string4), "IPsBanidos/%s.ini", ip);
if(fexist(string4)) //autoban
{
strmid(BanInfo[playerid][pMotivo], DOF2_GetString(string4,"Motivo"), 0, strlen(DOF2_GetString(string4,"Motivo")), 255);
strmid(BanInfo[playerid][pAdmBan], DOF2_GetString(string4,"Admin"), 0, strlen(DOF2_GetString(string4,"Admin")), 255);
strmid(BanInfo[playerid][pData], DOF2_GetString(string4,"Data"), 0, strlen(DOF2_GetString(string4,"Data")), 255);
strmid(BanInfo[playerid][pHora], DOF2_GetString(string4,"Hora"), 0, strlen(DOF2_GetString(string4,"Hora")), 255);
strmid(BanInfo[playerid][pNick], DOF2_GetString(string4,"Nick"), 0, strlen(DOF2_GetString(string4,"Nick")), 255);
format(string, 128, "{FF0000}Vocк estб Banido do Servidor.\n\n", PlayerName(playerid));
strcat(DialogBPH,string);
format(string, 128, "*******[INFORMAЗХES]*******\n");
strcat(DialogBPH,string);
format(string, sizeof(string), "{00FFFF}Nick: %s\n\n", BanInfo[playerid][pNick]);
strcat(DialogBPH,string);
format(string, sizeof(string), "{00FFFF}IP: %s\n\n", ip);
strcat(DialogBPH,string);
format(string, sizeof(string), "{00FFFF}Motivo: %s\n\n", BanInfo[playerid][pMotivo]);
strcat(DialogBPH,string);
format(string, sizeof(string), "{00FFFF}Admin: %s\n\n", BanInfo[playerid][pAdmBan]);
strcat(DialogBPH,string);
format(string, sizeof(string), "{00FFFF}Dia: %s\n\n", BanInfo[playerid][pData]);
strcat(DialogBPH,string);
format(string, sizeof(string), "{00FFFF}Hora: %s\n\n", BanInfo[playerid][pHora]);
strcat(DialogBPH,string);
format(string, sizeof(string), "{00FFFF}Data Desban: {FF0000}PERMANENTE\n\n", BanInfo[playerid][pHora]);
strcat(DialogBPH,string);
format(string, 128, "************************************\n", PlayerName(playerid));
strcat(DialogBPH,string);
format(string, sizeof(string), "{FF0000}Obs: Para fazer uma revisгo acesse\n{FFFFFF}www.gameliveforever.forumeiros.com");
strcat(DialogBPH,string);
ShowPlayerDialog(playerid, 8723, DIALOG_STYLE_MSGBOX, "{FFFFFF}Informaзхes do ban", DialogBPH, "Sair", "");
//Kick(playerid);
SetTimerEx("KickBanido", 10000, 0, "i", playerid);
NaoPodeLogar[playerid] = 1;
return true;
}
return true;
}
forward BanAuto2(playerid);
public BanAuto2(playerid)
{
new string[128];
new DialogBPH[1500];
new string3[128];
new string4[128];
new ip[16];
GetPlayerIp(playerid, ip, sizeof ip);
format(string3, sizeof(string3), "BanidosTemp/%s.ini", PlayerName(playerid));
if(fexist(string3)) //autoban
{
ClearChatbox(playerid, 100);
strmid(BanInfo[playerid][pMotivo], DOF2_GetString(string3,"Motivo"), 0, strlen(DOF2_GetString(string3,"Motivo")), 255);
strmid(BanInfo[playerid][pAdmBan], DOF2_GetString(string3,"Admin"), 0, strlen(DOF2_GetString(string3,"Admin")), 255);
strmid(BanInfo[playerid][pData], DOF2_GetString(string3,"Data"), 0, strlen(DOF2_GetString(string3,"Data")), 255);
strmid(BanInfo[playerid][pHora], DOF2_GetString(string3,"Hora"), 0, strlen(DOF2_GetString(string3,"Hora")), 255);
strmid(BanInfo[playerid][BanDia], DOF2_GetString(string3,"DiaBanTemp"), 0, strlen(DOF2_GetString(string3,"DiaBanTemp")), 255);
strmid(BanInfo[playerid][BanMes], DOF2_GetString(string3,"MesBanTemp"), 0, strlen(DOF2_GetString(string3,"MesBanTemp")), 255);
strmid(BanInfo[playerid][BanAno], DOF2_GetString(string3,"AnoBanTemp"), 0, strlen(DOF2_GetString(string3,"AnoBanTemp")), 255);
format(string, 128, "{FF0000}Vocк estб Banido do Servidor.\n\n");
strcat(DialogBPH,string);
format(string, 128, "{FFFFFF}*******[INFORMAЗХES]*******\n\n");
strcat(DialogBPH,string);
format(string, sizeof(string), "{00FFFF}Nick: %s\n\n", PlayerName(playerid));
strcat(DialogBPH,string);
format(string, sizeof(string), "{00FFFF}IP: %s\n\n", ip);
strcat(DialogBPH,string);
format(string, sizeof(string), "{00FFFF}Motivo: %s\n\n", BanInfo[playerid][pMotivo]);
strcat(DialogBPH,string);
format(string, sizeof(string), "{00FFFF}Admin: %s\n\n", BanInfo[playerid][pAdmBan]);
strcat(DialogBPH,string);
format(string, sizeof(string), "{00FFFF}Dia: %s\n\n", BanInfo[playerid][pData]);
strcat(DialogBPH,string);
format(string, sizeof(string), "{00FFFF}Hora: %s\n\n", BanInfo[playerid][pHora]);
strcat(DialogBPH,string);
format(string, sizeof(string), "{00FFFF}Data Desban: {00FF00}%s/%s/%s\n\n", BanInfo[playerid][BanDia], BanInfo[playerid][BanMes], BanInfo[playerid][BanAno], BanInfo[playerid][pHora]);
strcat(DialogBPH,string);
format(string, 128, "{FFFFFF}************************************\n");
strcat(DialogBPH,string);
format(string, sizeof(string), "{FF0000}Obs: Para fazer uma revisгo acesse\n{FFFFFF}www.gameliveforever.forumeiros.com");
strcat(DialogBPH,string);
ShowPlayerDialog(playerid, 8723, DIALOG_STYLE_MSGBOX, "{FFFFFF}Informaзхes do ban", DialogBPH, "Sair", "");
ForceClassSelection(playerid);
//Kick(playerid);
SetTimerEx("KickBanido", 10000, 0, "i", playerid);
NaoPodeLogar[playerid] = 1;
return true;
}
format(string4, sizeof(string4), "IPsBanidosTemp/%s.ini", ip);
if(fexist(string4)) //autoban
{
ClearChatbox(playerid, 100);
strmid(BanInfo[playerid][pMotivo], DOF2_GetString(string4,"Motivo"), 0, strlen(DOF2_GetString(string4,"Motivo")), 255);
strmid(BanInfo[playerid][pAdmBan], DOF2_GetString(string4,"Admin"), 0, strlen(DOF2_GetString(string4,"Admin")), 255);
strmid(BanInfo[playerid][pData], DOF2_GetString(string4,"Data"), 0, strlen(DOF2_GetString(string4,"Data")), 255);
strmid(BanInfo[playerid][pHora], DOF2_GetString(string4,"Hora"), 0, strlen(DOF2_GetString(string4,"Hora")), 255);
strmid(BanInfo[playerid][pNick], DOF2_GetString(string4,"Nick"), 0, strlen(DOF2_GetString(string4,"Nick")), 255);
strmid(BanInfo[playerid][BanDia], DOF2_GetString(string4,"DiaBanTemp"), 0, strlen(DOF2_GetString(string4,"DiaBanTemp")), 255);
strmid(BanInfo[playerid][BanMes], DOF2_GetString(string4,"MesBanTemp"), 0, strlen(DOF2_GetString(string4,"MesBanTemp")), 255);
strmid(BanInfo[playerid][BanAno], DOF2_GetString(string4,"AnoBanTemp"), 0, strlen(DOF2_GetString(string4,"AnoBanTemp")), 255);
format(string, 128, "{FF0000}Vocк estб Banido do Servidor.\n\n");
strcat(DialogBPH,string);
format(string, 128, "*******[INFORMAЗХES]*******\n");
strcat(DialogBPH,string);
format(string, sizeof(string), "{00FFFF}Nick: %s\n\n", BanInfo[playerid][pNick]);
strcat(DialogBPH,string);
format(string, sizeof(string), "{00FFFF}IP: %s\n\n", ip);
strcat(DialogBPH,string);
format(string, sizeof(string), "{00FFFF}Motivo: %s\n\n", BanInfo[playerid][pMotivo]);
strcat(DialogBPH,string);
format(string, sizeof(string), "{00FFFF}Admin: %s\n\n", BanInfo[playerid][pAdmBan]);
strcat(DialogBPH,string);
format(string, sizeof(string), "{00FFFF}Dia: %s\n\n", BanInfo[playerid][pData]);
strcat(DialogBPH,string);
format(string, sizeof(string), "{00FFFF}Hora: %s\n\n", BanInfo[playerid][pHora]);
strcat(DialogBPH,string);
format(string, sizeof(string), "{00FFFF}Data Desban: {00FF00}%s/%s/%s\n\n", BanInfo[playerid][BanDia], BanInfo[playerid][BanMes], BanInfo[playerid][BanAno], BanInfo[playerid][pHora]);
strcat(DialogBPH,string);
format(string, 128, "************************************\n");
strcat(DialogBPH,string);
format(string, sizeof(string), "{FFFFFF}Este IP sу serб desbanido com a mesma conta.\n");
strcat(DialogBPH,string);
format(string, sizeof(string), "{FF0000}Obs: Para fazer uma revisгo acesse\n");
strcat(DialogBPH,string);
format(string, sizeof(string), "{FFFFFF}www.gameliveforever.forumeiros.com\n");
strcat(DialogBPH,string);
ShowPlayerDialog(playerid, 8723, DIALOG_STYLE_MSGBOX, "{FFFFFF}Informaзхes do ban", DialogBPH, "Sair", "");
//Kick(playerid);
SetTimerEx("KickBanido", 10000, 0, "i", playerid);
NaoPodeLogar[playerid] = 1;
return true;
}
return true;
}
stock BanLog(string[])
{
new entry[128];
format(entry, sizeof(entry), "%s\n",string);
new File:hFile;
hFile = fopen("ban.log", io_append);
fwrite(hFile, entry);
fclose(hFile);
}
forward CheckDesbanAuto(playerid);
public CheckDesbanAuto(playerid)
{
new string3[128];
new string4[128];
new ANO, MES, DIA;
new ip[16];
GetPlayerIp(playerid, ip, sizeof ip);
format(string3, sizeof(string3), "BanidosTemp/%s.ini", PlayerName(playerid));
format(string4, sizeof(string4), "IPsBanidosTemp/%s.ini", ip);
if(fexist(string3))
{
getdate(ANO, MES, DIA);
if(DIA >= PlayerInfo[playerid][pDiaBanTemp] && MES >= PlayerInfo[playerid][pMesBanTemp] && ANO >= PlayerInfo[playerid][pAnoBanTemp])
{
DOF2_RemoveFile(string3);
FoiDesban[playerid] = 1;
NaoPodeLogar[playerid] = 0;
if(fexist(string4))
{
NaoPodeLogar[playerid] = 0;
DOF2_RemoveFile(string4);
}
}
else
{
NaoPodeLogar[playerid] = 1;
ForceClassSelection(playerid);
SetTimerEx("BanAuto2", 1300, 0, "i", playerid);
}
}
else
{
NaoPodeLogar[playerid] = 0;
}
if(fexist(string4))
{
NaoPodeLogar[playerid] = 1;
ForceClassSelection(playerid);
SetTimerEx("BanAuto2", 1300, 0, "i", playerid);
}
else
{
NaoPodeLogar[playerid] = 0;
}
return true;
}}
stock PlayerName(playerid)
{
new Name[MAX_PLAYER_NAME];
GetPlayerName(playerid, Name, MAX_PLAYER_NAME);
return Name;
}
public ClearChatbox(playerid, lines)
{
if (IsPlayerConnected(playerid))
{
for(new i=0; i<lines; i++)
{
SendClientMessage(playerid, COLOR_GRAD2, " ");
}
}
return true;
}
forward BanAuto(playerid);
public BanAuto(playerid)
{
new string[128];
new DialogBPH[1500];
new string3[128];
new string4[128];
new ip[16];
GetPlayerIp(playerid, ip, sizeof ip);
//format(string3, sizeof(string3), "IPsBanidos/%s.ini", ip);
format(string3, sizeof(string3), "Banidos/%s.ini", PlayerName(playerid));
if(fexist(string3)) //autoban
{
strmid(BanInfo[playerid][pMotivo], DOF2_GetString(string3,"Motivo"), 0, strlen(DOF2_GetString(string3,"Motivo")), 255);
strmid(BanInfo[playerid][pAdmBan], DOF2_GetString(string3,"Admin"), 0, strlen(DOF2_GetString(string3,"Admin")), 255);
strmid(BanInfo[playerid][pData], DOF2_GetString(string3,"Data"), 0, strlen(DOF2_GetString(string3,"Data")), 255);
strmid(BanInfo[playerid][pHora], DOF2_GetString(string3,"Hora"), 0, strlen(DOF2_GetString(string3,"Hora")), 255);
format(string, 128, "{FF0000}Vocк estб Banido do Servidor.\n\n", PlayerName(playerid));
strcat(DialogBPH,string);
format(string, 128, "{FFFFFF}*******[INFORMAЗХES]*******\n\n", PlayerName(playerid));
strcat(DialogBPH,string);
format(string, sizeof(string), "{00FFFF}Nick: %s\n\n", PlayerName(playerid));
strcat(DialogBPH,string);
format(string, sizeof(string), "{00FFFF}IP: %s\n\n", ip);
strcat(DialogBPH,string);
format(string, sizeof(string), "{00FFFF}Motivo: %s\n\n", BanInfo[playerid][pMotivo]);
strcat(DialogBPH,string);
format(string, sizeof(string), "{00FFFF}Admin: %s\n\n", BanInfo[playerid][pAdmBan]);
strcat(DialogBPH,string);
format(string, sizeof(string), "{00FFFF}Dia: %s\n\n", BanInfo[playerid][pData]);
strcat(DialogBPH,string);
format(string, sizeof(string), "{00FFFF}Hora: %s\n\n", BanInfo[playerid][pHora]);
strcat(DialogBPH,string);
format(string, sizeof(string), "{00FFFF}Data Desban: {FF0000}PERMANENTE\n\n", BanInfo[playerid][pHora]);
strcat(DialogBPH,string);
format(string, 128, "{FFFFFF}************************************\n", PlayerName(playerid));
strcat(DialogBPH,string);
format(string, sizeof(string), "{FF0000}Obs: Para fazer uma revisгo acesse\n{FFFFFF}www.gameliveforever.forumeiros.com");
strcat(DialogBPH,string);
ShowPlayerDialog(playerid, 8723, DIALOG_STYLE_MSGBOX, "{FFFFFF}Informaзхes do ban", DialogBPH, "Sair", "");
//Kick(playerid);
SetTimerEx("KickBanido", 10000, 0, "i", playerid);
NaoPodeLogar[playerid] = 1;
return true;
}
format(string4, sizeof(string4), "IPsBanidos/%s.ini", ip);
if(fexist(string4)) //autoban
{
strmid(BanInfo[playerid][pMotivo], DOF2_GetString(string4,"Motivo"), 0, strlen(DOF2_GetString(string4,"Motivo")), 255);
strmid(BanInfo[playerid][pAdmBan], DOF2_GetString(string4,"Admin"), 0, strlen(DOF2_GetString(string4,"Admin")), 255);
strmid(BanInfo[playerid][pData], DOF2_GetString(string4,"Data"), 0, strlen(DOF2_GetString(string4,"Data")), 255);
strmid(BanInfo[playerid][pHora], DOF2_GetString(string4,"Hora"), 0, strlen(DOF2_GetString(string4,"Hora")), 255);
strmid(BanInfo[playerid][pNick], DOF2_GetString(string4,"Nick"), 0, strlen(DOF2_GetString(string4,"Nick")), 255);
format(string, 128, "{FF0000}Vocк estб Banido do Servidor.\n\n", PlayerName(playerid));
strcat(DialogBPH,string);
format(string, 128, "*******[INFORMAЗХES]*******\n");
strcat(DialogBPH,string);
format(string, sizeof(string), "{00FFFF}Nick: %s\n\n", BanInfo[playerid][pNick]);
strcat(DialogBPH,string);
format(string, sizeof(string), "{00FFFF}IP: %s\n\n", ip);
strcat(DialogBPH,string);
format(string, sizeof(string), "{00FFFF}Motivo: %s\n\n", BanInfo[playerid][pMotivo]);
strcat(DialogBPH,string);
format(string, sizeof(string), "{00FFFF}Admin: %s\n\n", BanInfo[playerid][pAdmBan]);
strcat(DialogBPH,string);
format(string, sizeof(string), "{00FFFF}Dia: %s\n\n", BanInfo[playerid][pData]);
strcat(DialogBPH,string);
format(string, sizeof(string), "{00FFFF}Hora: %s\n\n", BanInfo[playerid][pHora]);
strcat(DialogBPH,string);
format(string, sizeof(string), "{00FFFF}Data Desban: {FF0000}PERMANENTE\n\n", BanInfo[playerid][pHora]);
strcat(DialogBPH,string);
format(string, 128, "************************************\n", PlayerName(playerid));
strcat(DialogBPH,string);
format(string, sizeof(string), "{FF0000}Obs: Para fazer uma revisгo acesse\n{FFFFFF}www.gameliveforever.forumeiros.com");
strcat(DialogBPH,string);
ShowPlayerDialog(playerid, 8723, DIALOG_STYLE_MSGBOX, "{FFFFFF}Informaзхes do ban", DialogBPH, "Sair", "");
//Kick(playerid);
SetTimerEx("KickBanido", 10000, 0, "i", playerid);
NaoPodeLogar[playerid] = 1;
return true;
}
return true;
}
forward BanAuto2(playerid);
public BanAuto2(playerid)
{
new string[128];
new DialogBPH[1500];
new string3[128];
new string4[128];
new ip[16];
GetPlayerIp(playerid, ip, sizeof ip);
format(string3, sizeof(string3), "BanidosTemp/%s.ini", PlayerName(playerid));
if(fexist(string3)) //autoban
{
ClearChatbox(playerid, 100);
strmid(BanInfo[playerid][pMotivo], DOF2_GetString(string3,"Motivo"), 0, strlen(DOF2_GetString(string3,"Motivo")), 255);
strmid(BanInfo[playerid][pAdmBan], DOF2_GetString(string3,"Admin"), 0, strlen(DOF2_GetString(string3,"Admin")), 255);
strmid(BanInfo[playerid][pData], DOF2_GetString(string3,"Data"), 0, strlen(DOF2_GetString(string3,"Data")), 255);
strmid(BanInfo[playerid][pHora], DOF2_GetString(string3,"Hora"), 0, strlen(DOF2_GetString(string3,"Hora")), 255);
strmid(BanInfo[playerid][BanDia], DOF2_GetString(string3,"DiaBanTemp"), 0, strlen(DOF2_GetString(string3,"DiaBanTemp")), 255);
strmid(BanInfo[playerid][BanMes], DOF2_GetString(string3,"MesBanTemp"), 0, strlen(DOF2_GetString(string3,"MesBanTemp")), 255);
strmid(BanInfo[playerid][BanAno], DOF2_GetString(string3,"AnoBanTemp"), 0, strlen(DOF2_GetString(string3,"AnoBanTemp")), 255);
format(string, 128, "{FF0000}Vocк estб Banido do Servidor.\n\n");
strcat(DialogBPH,string);
format(string, 128, "{FFFFFF}*******[INFORMAЗХES]*******\n\n");
strcat(DialogBPH,string);
format(string, sizeof(string), "{00FFFF}Nick: %s\n\n", PlayerName(playerid));
strcat(DialogBPH,string);
format(string, sizeof(string), "{00FFFF}IP: %s\n\n", ip);
strcat(DialogBPH,string);
format(string, sizeof(string), "{00FFFF}Motivo: %s\n\n", BanInfo[playerid][pMotivo]);
strcat(DialogBPH,string);
format(string, sizeof(string), "{00FFFF}Admin: %s\n\n", BanInfo[playerid][pAdmBan]);
strcat(DialogBPH,string);
format(string, sizeof(string), "{00FFFF}Dia: %s\n\n", BanInfo[playerid][pData]);
strcat(DialogBPH,string);
format(string, sizeof(string), "{00FFFF}Hora: %s\n\n", BanInfo[playerid][pHora]);
strcat(DialogBPH,string);
format(string, sizeof(string), "{00FFFF}Data Desban: {00FF00}%s/%s/%s\n\n", BanInfo[playerid][BanDia], BanInfo[playerid][BanMes], BanInfo[playerid][BanAno], BanInfo[playerid][pHora]);
strcat(DialogBPH,string);
format(string, 128, "{FFFFFF}************************************\n");
strcat(DialogBPH,string);
format(string, sizeof(string), "{FF0000}Obs: Para fazer uma revisгo acesse\n{FFFFFF}www.gameliveforever.forumeiros.com");
strcat(DialogBPH,string);
ShowPlayerDialog(playerid, 8723, DIALOG_STYLE_MSGBOX, "{FFFFFF}Informaзхes do ban", DialogBPH, "Sair", "");
ForceClassSelection(playerid);
//Kick(playerid);
SetTimerEx("KickBanido", 10000, 0, "i", playerid);
NaoPodeLogar[playerid] = 1;
return true;
}
format(string4, sizeof(string4), "IPsBanidosTemp/%s.ini", ip);
if(fexist(string4)) //autoban
{
ClearChatbox(playerid, 100);
strmid(BanInfo[playerid][pMotivo], DOF2_GetString(string4,"Motivo"), 0, strlen(DOF2_GetString(string4,"Motivo")), 255);
strmid(BanInfo[playerid][pAdmBan], DOF2_GetString(string4,"Admin"), 0, strlen(DOF2_GetString(string4,"Admin")), 255);
strmid(BanInfo[playerid][pData], DOF2_GetString(string4,"Data"), 0, strlen(DOF2_GetString(string4,"Data")), 255);
strmid(BanInfo[playerid][pHora], DOF2_GetString(string4,"Hora"), 0, strlen(DOF2_GetString(string4,"Hora")), 255);
strmid(BanInfo[playerid][pNick], DOF2_GetString(string4,"Nick"), 0, strlen(DOF2_GetString(string4,"Nick")), 255);
strmid(BanInfo[playerid][BanDia], DOF2_GetString(string4,"DiaBanTemp"), 0, strlen(DOF2_GetString(string4,"DiaBanTemp")), 255);
strmid(BanInfo[playerid][BanMes], DOF2_GetString(string4,"MesBanTemp"), 0, strlen(DOF2_GetString(string4,"MesBanTemp")), 255);
strmid(BanInfo[playerid][BanAno], DOF2_GetString(string4,"AnoBanTemp"), 0, strlen(DOF2_GetString(string4,"AnoBanTemp")), 255);
format(string, 128, "{FF0000}Vocк estб Banido do Servidor.\n\n");
strcat(DialogBPH,string);
format(string, 128, "*******[INFORMAЗХES]*******\n");
strcat(DialogBPH,string);
format(string, sizeof(string), "{00FFFF}Nick: %s\n\n", BanInfo[playerid][pNick]);
strcat(DialogBPH,string);
format(string, sizeof(string), "{00FFFF}IP: %s\n\n", ip);
strcat(DialogBPH,string);
format(string, sizeof(string), "{00FFFF}Motivo: %s\n\n", BanInfo[playerid][pMotivo]);
strcat(DialogBPH,string);
format(string, sizeof(string), "{00FFFF}Admin: %s\n\n", BanInfo[playerid][pAdmBan]);
strcat(DialogBPH,string);
format(string, sizeof(string), "{00FFFF}Dia: %s\n\n", BanInfo[playerid][pData]);
strcat(DialogBPH,string);
format(string, sizeof(string), "{00FFFF}Hora: %s\n\n", BanInfo[playerid][pHora]);
strcat(DialogBPH,string);
format(string, sizeof(string), "{00FFFF}Data Desban: {00FF00}%s/%s/%s\n\n", BanInfo[playerid][BanDia], BanInfo[playerid][BanMes], BanInfo[playerid][BanAno], BanInfo[playerid][pHora]);
strcat(DialogBPH,string);
format(string, 128, "************************************\n");
strcat(DialogBPH,string);
format(string, sizeof(string), "{FFFFFF}Este IP sу serб desbanido com a mesma conta.\n");
strcat(DialogBPH,string);
format(string, sizeof(string), "{FF0000}Obs: Para fazer uma revisгo acesse\n");
strcat(DialogBPH,string);
format(string, sizeof(string), "{FFFFFF}www.gameliveforever.forumeiros.com\n");
strcat(DialogBPH,string);
ShowPlayerDialog(playerid, 8723, DIALOG_STYLE_MSGBOX, "{FFFFFF}Informaзхes do ban", DialogBPH, "Sair", "");
//Kick(playerid);
SetTimerEx("KickBanido", 10000, 0, "i", playerid);
NaoPodeLogar[playerid] = 1;
return true;
}
return true;
}