Szerző Téma: Anti-IP  (Megtekintve 507 alkalommal)

Nem elérhető pisti525

  • 906
  • One Shot, One Kill
    • Profil megtekintése
Anti-IP
« Dátum: 2013. Június 17. - 20:49:43 »
0 Show voters
Sziasztok.

Kellene nekem egy Anti-IP rendszer. Olyan hogy ha feljön egy gyerek én hirdeti a szerverét akkor egybõl IP bant kapjon.


Elõre is köszönöm!

Nem elérhető ZSOLTI99

  • 1827
    • Profil megtekintése
Anti-IP
« Válasz #1 Dátum: 2013. Június 17. - 21:21:49 »
+1 Show voters
#include <a_samp>
 
new str[128];
 
public OnPlayerText(playerid, text[])
{
 
if(anty(text) && !IsPlayerAdmin(playerid))
{
format(str,256,\"*** Player %s has been banned from the Server. Reason: advertising IP / PAGE\",PlayerName(playerid));
SendClientMessageToAll(0xFF0000FF, str);
Ban(playerid);
return 0;
}
 
return 1;
}
stock anty(string[])
{
if(strfind(string,\"www.\",true)!=-1 || strfind(string,\"http://\",true)!=-1 || strfind(string,\".com\",true)!=-1 || strfind(string,\".net\",true)!=-1 || strfind(string,\"91.\",true)!=-1 || strfind(string,\"195.\",true)!=-1 || strfind(string,\".pl\",true)!=-1|| strfind(string,\".org\",true)!=-1)
return true;
return false;
}
 
stock PlayerName(playerid)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
return name;
}

Nem elérhető pisti525

  • 906
  • One Shot, One Kill
    • Profil megtekintése
Anti-IP
« Válasz #2 Dátum: 2013. Június 17. - 22:38:45 »
0 Show voters
Köszi!  :)

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal