Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Link: http://samp-scripts.com/post/13552/T-Security_AntiHack_y_AntiAtaques_incluye_/sban/ScptProcura/filterscript/other
- FS Codigo
- ////////////////////////////////////////////////////////////
- // ==}} ICE-SECURITY {{== //
- // Tec-Security Edicion Beta 1.0 //
- // **Creditos**: Creador del FS: Tec Manuel Garcia //////////////////
- //CleoFuck: Lorenc y Dicipulos Cessil, Infamous and [FeK]Drakins, JernejL//
- // IPS Proxys Baneadas: Tec Manuel Garcia ////////////////
- //Si este Sistema Cuenta con Funciones de FireSecurity Le doy Creditos//
- #include <a_samp>
- #include <CleoFuck>
- #include <a_vehicles>
- #include <sscanf2>
- #pragma tabsize 0
- //DCMD PARA EL SBAN
- #define dcmd(%1,%2,%3) if (!strcmp((%3)[1], #%1, true, (%2)) && ((((%3)[(%2) + 1] == '\0') && (dcmd_%1(playerid, ""))) || (((%3)[(%2) + 1] == ' ') && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
- //=============//
- //SerialBan
- new Location[100] = "/Serial_Bans/%s.lock"; //
- //=============================================
- //Proteccion de RaKSamp Bot- Extraido de RaKSamp PRO R2 T-Security
- #define RakSAMP "DA0E5085558CCACC88ECCA40C4CEC49A9408EEE8" //Esta Funcion posiblemente este desabilitada en 0.3x, por la llegada de un Nuevo RakSamp
- //Control de Funciones ( 0 para desactivar, 1 para activar)
- #define AntiBotSerialBan 1 //Este Detiene ataques PingFlood, RaKSamp, y bots comunes en el server.
- #define AntiScoreHack 1 //Este evita el scoregratis incluido en el Nuevo RaKSamp 0.3x
- #define AntiCrash 1 //Este Evita los crash creados por Sobeit, Niex, RakSamp
- #define AntiRconBrute 1 //Este es un Comun desactivador de RCON EXTERNAS y evita la extracción de la Rcon Medianto los Comunes RconHacks
- #define AntiVisoresBug 1 //Evita los bugeros con los Binoculares Termicos
- #define ProxyBan 1 //Este Evita las entradas con los Proxys Mas concurridos.
- //Natives usados en T-Security
- native gpci(playerid,const serial[],maxlen);
- native IsValidVehicle(vehicleid);
- //Stocks de T-Security
- stock PlayerName2(playerid) {
- new name[MAX_PLAYER_NAME];
- GetPlayerName(playerid, name, sizeof(name));
- return name;
- }
- //Carros
- new legalmods[48][22] = {
- {400, 1024,1021,1020,1019,1018,1013,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000},
- {401, 1145,1144,1143,1142,1020,1019,1017,1013,1007,1006,1005,1004,1003,1001,0000,0000,0000,0000},
- {404, 1021,1020,1019,1017,1016,1013,1007,1002,1000,0000,0000,0000,0000,0000,0000,0000,0000,0000},
- {405, 1023,1021,1020,1019,1018,1014,1001,1000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000},
- {410, 1024,1023,1021,1020,1019,1017,1013,1007,1003,1001,0000,0000,0000,0000,0000,0000,0000,0000},
- {415, 1023,1019,1018,1017,1007,1003,1001,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000},
- {418, 1021,1020,1016,1006,1002,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000},
- {420, 1021,1019,1005,1004,1003,1001,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000},
- {421, 1023,1021,1020,1019,1018,1016,1014,1000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000},
- {422, 1021,1020,1019,1017,1013,1007,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000},
- {426, 1021,1019,1006,1005,1004,1003,1001,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000},
- {436, 1022,1021,1020,1019,1017,1013,1007,1006,1003,1001,0000,0000,0000,0000,0000,0000,0000,0000},
- {439, 1145,1144,1143,1142,1023,1017,1013,1007,1003,1001,0000,0000,0000,0000,0000,0000,0000,0000},
- {477, 1021,1020,1019,1018,1017,1007,1006,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000},
- {478, 1024,1022,1021,1020,1013,1012,1005,1004,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000},
- {489, 1024,1020,1019,1018,1016,1013,1006,1005,1004,1002,1000,0000,0000,0000,0000,0000,0000,0000},
- {491, 1145,1144,1143,1142,1023,1021,1020,1019,1018,1017,1014,1007,1003,0000,0000,0000,0000,0000},
- {492, 1016,1006,1005,1004,1000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000},
- {496, 1143,1142,1023,1020,1019,1017,1011,1007,1006,1003,1002,1001,0000,0000,0000,0000,0000,0000},
- {500, 1024,1021,1020,1019,1013,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000},
- {516, 1021,1020,1019,1018,1017,1016,1015,1007,1004,1002,1000,0000,0000,0000,0000,0000,0000,0000},
- {517, 1145,1144,1143,1142,1023,1020,1019,1018,1017,1016,1007,1003,1002,0000,0000,0000,0000,0000},
- {518, 1145,1144,1143,1142,1023,1020,1018,1017,1013,1007,1006,1005,1003,1001,0000,0000,0000,0000},
- {527, 1021,1020,1018,1017,1015,1014,1007,1001,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000},
- {529, 1023,1020,1019,1018,1017,1012,1011,1007,1006,1003,1001,0000,0000,0000,0000,0000,0000,0000},
- {534, 1185,1180,1179,1178,1127,1126,1125,1124,1123,1122,1106,1101,1100,0000,0000,0000,0000,0000},
- {535, 1121,1120,1119,1118,1117,1116,1115,1114,1113,1110,1109,0000,0000,0000,0000,0000,0000,0000},
- {536, 1184,1183,1182,1181,1128,1108,1107,1105,1104,1103,0000,0000,0000,0000,0000,0000,0000,0000},
- {540, 1145,1144,1143,1142,1024,1023,1020,1019,1018,1017,1007,1006,1004,1001,0000,0000,0000,0000},
- {542, 1145,1144,1021,1020,1019,1018,1015,1014,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000},
- {546, 1145,1144,1143,1142,1024,1023,1019,1018,1017,1007,1006,1004,1002,1001,0000,0000,0000,0000},
- {547, 1143,1142,1021,1020,1019,1018,1016,1003,1000,0000,0000,0000,0000,0000,0000,0000,0000,0000},
- {549, 1145,1144,1143,1142,1023,1020,1019,1018,1017,1012,1011,1007,1003,1001,0000,0000,0000,0000},
- {550, 1145,1144,1143,1142,1023,1020,1019,1018,1006,1005,1004,1003,1001,0000,0000,0000,0000,0000},
- {551, 1023,1021,1020,1019,1018,1016,1006,1005,1003,1002,0000,0000,0000,0000,0000,0000,0000,0000},
- {558, 1168,1167,1166,1165,1164,1163,1095,1094,1093,1092,1091,1090,1089,1088,0000,0000,0000,0000},
- {559, 1173,1162,1161,1160,1159,1158,1072,1071,1070,1069,1068,1067,1066,1065,0000,0000,0000,0000},
- {560, 1170,1169,1141,1140,1139,1138,1033,1032,1031,1030,1029,1028,1027,1026,0000,0000,0000,0000},
- {561, 1157,1156,1155,1154,1064,1063,1062,1061,1060,1059,1058,1057,1056,1055,1031,1030,1027,1026},
- {562, 1172,1171,1149,1148,1147,1146,1041,1040,1039,1038,1037,1036,1035,1034,0000,0000,0000,0000},
- {565, 1153,1152,1151,1150,1054,1053,1052,1051,1050,1049,1048,1047,1046,1045,0000,0000,0000,0000},
- {567, 1189,1188,1187,1186,1133,1132,1131,1130,1129,1102,0000,0000,0000,0000,0000,0000,0000,0000},
- {575, 1177,1176,1175,1174,1099,1044,1043,1042,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000},
- {576, 1193,1192,1191,1190,1137,1136,1135,1134,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000},
- {580, 1023,1020,1018,1017,1007,1006,1001,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000},
- {589, 1145,1144,1024,1020,1018,1017,1016,1013,1007,1006,1005,1004,1000,0000,0000,0000,0000,0000},
- {600, 1022,1020,1018,1017,1013,1007,1006,1005,1004,0000,0000,0000,0000,0000,0000,0000,0000,0000},
- {603, 1145,1144,1143,1142,1024,1023,1020,1019,1018,1017,1007,1006,1001,0000,0000,0000,0000,0000}
- };
- iswheelmodel(modelid) {
- new wheelmodels[17] = {1025,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1096,1097,1098};
- for(new wm; wm < sizeof(wheelmodels); wm++) {
- if (modelid == wheelmodels[wm])
- return true;
- }
- return false;
- }
- IllegalCarNitroIde(carmodel) {
- new illegalvehs[29] = { 581, 523, 462, 521, 463, 522, 461, 448, 468, 586, 509, 481, 510, 472, 473, 493, 595, 484, 430, 453, 452, 446, 454, 590, 569, 537, 538, 570, 449 };
- for(new iv; iv < sizeof(illegalvehs); iv++) {
- if (carmodel == illegalvehs[iv])
- return true;
- }
- return false;
- }
- stock islegalcarmod(vehicleide, componentid) {
- new modok = false;
- if ( (iswheelmodel(componentid)) || (componentid == 1086) || (componentid == 1087) || ((componentid >= 1008) && (componentid <= 1010))) {
- new nosblocker = IllegalCarNitroIde(vehicleide);
- if (!nosblocker)
- modok = true;
- } else {
- for(new lm; lm < sizeof(legalmods); lm++) {
- if (legalmods[lm][0] == vehicleide) {
- for(new J = 1; J < 22; J++) {
- if (legalmods[lm][J] == componentid)
- modok = true;
- }
- }
- }
- }
- return modok;
- }
- #define Seguridad_Color 0xFF9900AA
- //Aqui empiesan las Funciones de Tec-Security con los Publics
- public OnFilterScriptInit()
- {
- print("| --------------------------------------");
- print(" ");
- print(" Has arrancado en tu servidor ICESECURITY- Tec-Security (Edicion 1.0 Beta).");
- print(" ");
- print(" --------------------------------------");
- #if defined AntiRconBrute 1
- SendRconCommand("rcon 0");
- #endif
- #if defined ProxyBan 1
- SendRconCommand("banip 62.173.43.73");
- SendRconCommand("banip 202.70.136.158");
- SendRconCommand("banip 190.189.114.41"); //Esta Proviene de Servidores Argentinos
- SendRconCommand("banip 218.108.114.140");
- SendRconCommand("banip 186.96.254.226");
- SendRconCommand("banip 68.55.148.148");
- SendRconCommand("banip 142.4.4.57");
- SendRconCommand("banip 128.127.46.192");
- SendRconCommand("banip 173.72.110.132");
- SendRconCommand("banip 190.85.37.115");
- SendRconCommand("banip 198.145.180.225");
- //Estas Son las Proxys mas Usadas si quieres agregar mas visita http://www.freeproxylists.net/ y/o http://hidemyass.com/proxy-list/
- //Siguiendo la Syntexis de los Codigos.
- #endif
- return 1;
- }
- public OnFilterScriptExit()
- {
- print("| --------------------------------------");
- print(" ");
- print(" Has cerrado en tu servidor ICESECURITY- Tec-Security (Edicion 1.0 Beta).");
- print(" ");
- print(" --------------------------------------");
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- #if defined AntiBotSerialBan 1
- new string2[350];
- // Sban
- new Code[50], Line[256];
- SendClientMessage(playerid,0xFF9900AA," Este Servidor Cuenta con T-Security creado por Tec Manuel Garcia"); //Creditos
- //SerialBan
- gpci(playerid, Code, sizeof Code);
- format(Line, sizeof(Line), Location, Code);
- if(fexist(Line)) return Kick(playerid);
- //Division en Antibots y Sban
- gpci(playerid,string2,sizeof(string2));
- if(!strcmp(string2,RakSAMP,true))
- {
- format(string2, sizeof(string2), "[T-Security]: {0000FF} Player %s Baneado [Motivo-RakSamp, Bots, Niex. ]",PlayerName2(playerid));
- SendClientMessageToAll(Seguridad_Color, string2);
- //Baneo del Jugador En Funcion, Puedes cambiar el Banex por Kick(playerid);
- BanEx(playerid,"ICESECURITY.-.T-Security Edicion Beta [EXPULSADO]");
- return 0;
- }
- #endif
- return 1;
- }
- //AntiCrasheo para el Servidor
- #if defined AntiCrash 1
- public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
- {
- if(!IsValidVehicle(vehicleid))
- {
- new string[300];
- format(string, sizeof(string), "[T-Security]: {0000FF} Player %s Expulsado [Razon: Sobeit-Crash/RakSamp Lag Detectado.]",PlayerName2(playerid));
- SendClientMessageToAll(Seguridad_Color, string);
- //Esta Funcion Desaparece el el vehiculo Ilegal
- DestroyVehicle(vehicleid);
- //En esta Funcion se kickea al Player puedes Cambiar esta Funcion por Baneo BanEx(playerid, "Mensaje");
- Kick(playerid);
- }
- return 1;
- }
- #endif
- //Este CallBack fue integrado Gracias a FuckCleo, y reconociendo una Funcion Muy Buena con la que contaba FireSecurity (CREDITOS A FUCKCLEO Y FIRESECURITY QUE HALLARON ESTA FUNCION MUY VALIOSA)
- public OnPlayerCleoDetected( playerid, cleoid )
- {
- switch( cleoid )
- {
- #if defined AntiScoreHack
- case CLEO_FAKEKILL:
- {
- new string[300];
- format(string, sizeof(string), "[T-Security]: {0000FF} Player %s Expulsado [Causa-ScoreHack. ]",PlayerName2(playerid));
- SendClientMessageToAll(Seguridad_Color, string);
- BanEx( playerid, "Gracias por Hacer Valer este Sistema de Seguridad" );
- }
- #endif
- case CLEO_CARWARP:
- {
- new string[300];
- format(string, sizeof(string), "[T-Security]: {0000FF} Player %s Baneado [Causa-CarWarping. ] ",PlayerName2(playerid));
- SendClientMessageToAll(Seguridad_Color, string);
- BanEx( playerid, "Lo siento No puedes Hacer esto aqui." );
- }
- case CLEO_CARSWING:
- {
- new string[300];
- format(string, sizeof(string), "[T-Security]: {0000FF} Player %s Baneado {FFDB70}[Causa-CarSwing. ]",PlayerName2(playerid));
- SendClientMessageToAll(Seguridad_Color, string);
- BanEx( playerid, "Me despido de Ti Cheto" );
- }
- //Esta Funcion evita el Flood de automoviles que causan lag y despues Crash
- case CLEO_CAR_PARTICLE_SPAM:
- {
- new string[300];
- format(string, sizeof(string), "[T-Security]: {0000FF} Player %s Baneado [Causa-Crasher]",PlayerName2(playerid));
- SendClientMessageToAll(Seguridad_Color, string);
- BanEx( playerid, "Vete a otro Lado Idiota" );
- }
- }
- return 1;
- }
- //Anti Bots, Funcion SA-MP
- public OnPlayerUpdate(playerid)
- {
- #if defined AntiBot 1
- //Detecta el Ping, y si el maximo es el marcado (Default: 5000MS), Lo Expulsa
- if(GetPlayerPing(playerid) >= 5000)
- {
- new string[300];
- format(string, sizeof(string), "[T-Security]: {0000FF} Player %s Expulsado [Causa-PingFlood/Bots ]",PlayerName2(playerid));
- SendClientMessageToAll(Seguridad_Color, string);
- Kick(playerid);
- return 1;
- }
- #endif
- #if defined AntiVisoresBug 1
- if((GetPlayerWeapon(playerid) == 44 || GetPlayerWeapon(playerid) == 45) && !IsPlayerInAnyVehicle(playerid))
- {
- new keys, ud, lr;
- GetPlayerKeys(playerid, keys, ud, lr);
- if(keys & KEY_FIRE)
- {
- return 0;
- }
- return 1;
- }
- #endif
- return 1;
- }
- //Esta Funcion Banea a los Crasheros que tienen Sobeit y usan TELEHACK para hacercarse al Player y Crashearlo.
- public OnVehicleMod(playerid, vehicleid, componentid) {
- #if defined AntiCrash 1
- new vehicleide = GetVehicleModel(vehicleid);
- new modok = islegalcarmod(vehicleide, componentid);
- if (!modok)
- {
- new string[300];
- format(string, sizeof(string), "[T-Security]: {0000FF} Player %s Baneado [Causa-CheatCrash ] ",PlayerName2(playerid));
- SendClientMessageToAll(Seguridad_Color, string);
- Ban(playerid);
- }
- return 1;
- #endif
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- dcmd(sban, 4, cmdtext);
- dcmd(detectarserial, 14, cmdtext);
- return 0;
- }
- dcmd_sban(playerid, params[])
- {
- if(!IsPlayerAdmin(playerid)) return 0;
- new Code[50], Line[128], User, Nickname[MAX_PLAYER_NAME];
- if(sscanf(params, "u", User)) return SendClientMessage(playerid, 0xFF0000FF, "[T-Security]: /sban <nickname> /sban <id>");
- if(!IsPlayerConnected(User)) return SendClientMessage(playerid, 0xFF0000FF, "[T-Security]: Ningun Jugador detectador con esa informacion");
- gpci(User, Code, sizeof(Code));
- format(Line, sizeof(Line), Location, Code);
- GetPlayerName(User, Nickname, sizeof(Nickname));
- new File:Datoteka = fopen(Line, io_write);
- fwrite(Datoteka, Nickname);
- fclose(Datoteka);
- Kick(User);
- SendClientMessage(playerid, 0xFFFFFF, "[T-Security]:Usuario Añadido al Lista de SerialBaneado y fue expulsado del Server.");
- return 1;
- }
- dcmd_detectarserial(playerid, params[])
- {
- if(!IsPlayerAdmin(playerid)) return 0;
- new Code[50], Line[128], User;
- if(sscanf(params, "u", User)) return SendClientMessage(playerid, 0xFF0000FF, "[T-Security]: /detectarserial <Nickname / ID>");
- if(!IsPlayerConnected(User)) return SendClientMessage(playerid, 0xFF0000FF, "[T-Security]: No se encontro ningun usuario con esa Informacion");
- gpci(User, Code, sizeof(Code));
- format(Line, sizeof(Line), "Serial del Usuario: %s", Code);
- SendClientMessage(playerid, 0xFFFFFF, Line);
- return 1;
- }
- //Final de T-Security
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement