Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Não adianta mudar os creditos não foi você que fez
- Meu Server: 167.114.42.20:7762
- */
- #include <a_samp>
- new kickado[MAX_PLAYERS];
- public OnFilterScriptInit()
- {
- print("\n-------------------------------------");
- print("Anti Cheat 1.0 By [Mdi].[$]_Red_[MF] Loaded");
- print("Meu Server ip: 167.114.42.20:7762\n");
- print("-------------------------------------\n");
- return 1;
- }
- public OnPlayerDisconnect(playerid)
- {
- kickado[playerid] = 0;
- return 1;
- }
- public OnPlayerUpdate(playerid)
- {
- if(GetPlayerWeapon(playerid) != WEAPON_PARACHUTE && GetPlayerAnimationIndex(playerid) == 974 || GetPlayerWeapon(playerid) != WEAPON_PARACHUTE && GetPlayerAnimationIndex(playerid) == 972 || GetPlayerWeapon(playerid) != WEAPON_PARACHUTE && GetPlayerAnimationIndex(playerid) == 968)
- {
- if(kickado[playerid] == 0)
- {
- kickado[playerid]++;
- new name[24], string[135];
- GetPlayerName(playerid, name, sizeof(name));
- format(string, sizeof(string), "[ANTI-CHEAT]: %s foi kickado [Motivo: Skin Bug]", name);
- SendClientMessageToAll(-1, string);
- SetTimerEx("rkick", 500, false, "i", playerid);
- print(string);
- }
- }
- new Float:x, Float:y, Float:z;
- GetPlayerPos(playerid, x, y, z);
- if(GetPlayerWeapon(playerid) != WEAPON_PARACHUTE && GetPlayerAnimationIndex(playerid) == 959 || !IsPlayerInWater(playerid) && GetPlayerAnimationIndex(playerid) == 1539 && z > 14 || GetPlayerWeapon(playerid) != WEAPON_PARACHUTE && GetPlayerAnimationIndex(playerid) == 958 && z > 14)
- {
- if(kickado[playerid] == 0)
- {
- kickado[playerid]++;
- new name[24], string[135];
- GetPlayerName(playerid, name, sizeof(name));
- format(string, sizeof(string), "[ANTI-CHEAT]: %s foi kickado [Motivo: Fly]", name);
- SendClientMessageToAll(-1, string);
- SetTimerEx("rkick", 500, false, "i", playerid);
- print(string);
- }
- }
- return 1;
- }
- forward rkick(playerid);
- public rkick(playerid)
- {
- Kick(playerid);
- return 1;
- }
- stock IsPlayerInWater(playerid)//by stabker http://forum.sa-mp.com/showthread.php?t=400049
- {
- new Float:Z;
- GetPlayerPos(playerid,Z,Z,Z);
- if(Z < 0.7) switch(GetPlayerAnimationIndex(playerid)) { case 1543,1538,1539: return 1; }
- if(GetPlayerDistanceFromPoint(playerid,-965,2438,42) <= 700 && Z < 45)return 1;
- new Float:water_places[][] =
- {
- {25.0, 2313.0, -1417.0, 23.0},
- {15.0, 1280.0, -773.0, 1082.0},
- {15.0, 1279.0, -804.0, 86.0},
- {20.0, 1094.0, -674.0, 111.0},
- {26.0, 194.0, -1232.0, 76.0},
- {25.0, 2583.0, 2385.0, 15.0},
- {25.0, 225.0, -1187.0, 73.0},
- {50.0, 1973.0, -1198.0, 17.0}
- };
- for(new t=0; t < sizeof water_places; t++)
- if(GetPlayerDistanceFromPoint(playerid,water_places[t][1],water_places[t][2],water_places[t][3]) <= water_places[t][0]) return 1;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement