SA-MP Forums Archive
Anti Con Worked But Not Good Help Me + Rep - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Anti Con Worked But Not Good Help Me + Rep (/showthread.php?tid=551184)



Anti Con Worked But Not Good Help Me + Rep - alishvasis - 17.12.2014

Hi All. i FInd Anti Con Script And Worked But Not Good. If Player Join To Server With Con Nickname Got Banned. But If Player Join To Server As Con NickName Whith Part Of His NAme Not Banned... Example Player Join With This Nickname To Server: con.John OR Example con.Sina And MY Server SHut down... Any One Can Fix My Script I Realy Need It + Rep
This Is My Script Code :
Код HTML:
#include <a_samp>
#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
    return 1;
}

#endif
new Name[MAX_PLAYER_NAME];

new NicksProibidos[54][MAX_PLAYER_NAME] ={  // 54 ant nick se for aumenta a cada 1 aumentado aumente ali tanbem!
"com1","com2","com3","com4","com5","com6","com7","com8","com9","COM1","COM2","COM3",
"COM4","COM5","COM6","COM7","COM8","COM9","lpt1","lpt2","lpt3","lpt4","lpt5","lpt6",
"lpt7","lpt8","lpt9","prn1","prn2","prn3","prn4","prn5","prn6","prn7","prn8","prn9",
"aux1","aux2","aux3","aux4","aux5","aux6","aux7","aux8""aux9","clock$","nul","con",
"CON","con","con1","aux","aux1","PRN","AUX"
};

public OnPlayerConnect(playerid) {
  for (new i; i < sizeof(NicksProibidos); i++) {
    new nickproibido[40];
    GetPlayerName(playerid, nickproibido, 40);
    if (strfind(NicksProibidos[i], nickproibido, true) == 0) {
      SendClientMessage(playerid, 0xFFFF00AA, "English: You Have been Banned Noob! Persian: Hanoo Zoode ;)");
      SendClientMessage(playerid, 0xFFFF00AA, "Bye Bye");
      GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~r~Best Of Zombie Servers!!", 3000, 3); //ira aparecer na tela eu acho massa se usar se quizer!
      Ban(playerid);
    }
  }
}



Re: Anti Con Worked But Not Good Help Me + Rep - M4D - 17.12.2014

Use
break;
after
Ban(playerid);

Edit:
Use Strcmp
And add "con." in array


Re: Anti Con Worked But Not Good Help Me + Rep - alishvasis - 17.12.2014

I Maked This But Banned All Players


if(sscanf(params,"con.", name)) return Ban(playerid);


Re: Anti Con Worked But Not Good Help Me + Rep - M4D - 17.12.2014

what is "params" ??!!

try this:

pawn Код:
#include <a_samp>
#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
    return 1;
}

#endif
new Name[MAX_PLAYER_NAME];

new NicksProibidos[54][MAX_PLAYER_NAME] ={  // 54 ant nick se for aumenta a cada 1 aumentado aumente ali tanbem!
"com1","com2","com3","com4","com5","com6","com7","com8","com9","COM1","COM2","COM3",
"COM4","COM5","COM6","COM7","COM8","COM9","lpt1","lpt2","lpt3","lpt4","lpt5","lpt6",
"lpt7","lpt8","lpt9","prn1","prn2","prn3","prn4","prn5","prn6","prn7","prn8","prn9",
"aux1","aux2","aux3","aux4","aux5","aux6","aux7","aux8""aux9","clock$","nul","con",
"CON","con","con1","aux","aux1","PRN","AUX","con."
};

public OnPlayerConnect(playerid) {
  for (new i; i < sizeof(NicksProibidos); i++) {
    new nickproibido[40];
    GetPlayerName(playerid, nickproibido, 40);
    if (strfind(NicksProibidos[i], nickproibido, true) == 0) {
      SendClientMessage(playerid, 0xFFFF00AA, "English: You Have been Banned Noob! Persian: Hanoo Zoode ;)");
      SendClientMessage(playerid, 0xFFFF00AA, "Bye Bye");
      GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~r~Best Of Zombie Servers!!", 3000, 3); //ira aparecer na tela eu acho massa se usar se quizer!
      Ban(playerid);
      break;
    }
  }
}



Re: Anti Con Worked But Not Good Help Me + Rep - alishvasis - 17.12.2014

Quote:
Originally Posted by M4D
Посмотреть сообщение
what is "params" ??!!

try this:

pawn Код:
#include <a_samp>
#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
    return 1;
}

#endif
new Name[MAX_PLAYER_NAME];

new NicksProibidos[54][MAX_PLAYER_NAME] ={  // 54 ant nick se for aumenta a cada 1 aumentado aumente ali tanbem!
"com1","com2","com3","com4","com5","com6","com7","com8","com9","COM1","COM2","COM3",
"COM4","COM5","COM6","COM7","COM8","COM9","lpt1","lpt2","lpt3","lpt4","lpt5","lpt6",
"lpt7","lpt8","lpt9","prn1","prn2","prn3","prn4","prn5","prn6","prn7","prn8","prn9",
"aux1","aux2","aux3","aux4","aux5","aux6","aux7","aux8""aux9","clock$","nul","con",
"CON","con","con1","aux","aux1","PRN","AUX","con."
};

public OnPlayerConnect(playerid) {
  for (new i; i < sizeof(NicksProibidos); i++) {
    new nickproibido[40];
    GetPlayerName(playerid, nickproibido, 40);
    if (strfind(NicksProibidos[i], nickproibido, true) == 0) {
      SendClientMessage(playerid, 0xFFFF00AA, "English: You Have been Banned Noob! Persian: Hanoo Zoode ;)");
      SendClientMessage(playerid, 0xFFFF00AA, "Bye Bye");
      GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~r~Best Of Zombie Servers!!", 3000, 3); //ira aparecer na tela eu acho massa se usar se quizer!
      Ban(playerid);
      break;
    }
  }
}
Not Work Im Join With This Name : con.youngie And My Server Got Down... HElp Me Scripters I Realy NEed It


Re: Anti Con Worked But Not Good Help Me + Rep - alishvasis - 17.12.2014

Quote:
Originally Posted by [HLF]Southclaw
Посмотреть сообщение
I tried to help you already. What do you mean by "My Server Got Down"? If it's a crash then use crashdetect and use the results to track the issue or post them here for further help.
Lol You Cant HElp Me ! You Know ? You Dont Know To FIx This BuG


Re: Anti Con Worked But Not Good Help Me + Rep - alishvasis - 17.12.2014

FiXed_________