anti- fly hack
#1

how to anti- fly hack
help me plz...
Reply
#2

Quote:
Originally Posted by Tmw9s
Посмотреть сообщение
how to anti- fly hack
help me plz...
Код:
#include <a_samp>
#include <foreach>
#pragma tabsize 0

public OnFilterScriptInit(){SetTimer("HileDenetle",1000,1);return 1;}

stock AnimCek(playerid)
{
if(!IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_ONFOOT){
new animcik[32], animismine[32];
GetAnimationName(GetPlayerAnimationIndex(playerid),animcik,32,animismine,32);
if(
!strcmp(animcik, "SWIM", true) &&
!strcmp(animismine, "SWIM_GLIDE", true)) return 1;
else
if(
!strcmp(animcik, "SWIM", true) &&
!strcmp(animismine, "SWIM_BREAST", true)) return 1;
else
if(
!strcmp(animcik, "SWIM", true) &&
!strcmp(animismine, "SWIM_CRAWL", true)) return 1;
else
if(
!strcmp(animcik, "SWIM", true) &&
!strcmp(animismine, "SWIM_DIVE_UNDER", true)) return 1;
else
if(
!strcmp(animcik, "SWIM", true) &&
!strcmp(animismine, "SWIM_DIVE_GLIDE", true)) return 1;
else
if(
!strcmp(animcik, "SWIM", true) &&
!strcmp(animismine, "SWIM_UNDER", true)) return 1;
else
if(
!strcmp(animcik, "SWIM", true) &&
!strcmp(animismine, "SWIM_TREAD", true)) return 1;
}
return 0;
}

stock PosCek(playerid)
{
new Float:x,Float:y,Float:z;
GetPlayerPos(playerid, x, y, z);if((
x >= -1408.0629 &&
y >= 2021.0587 &&
x <= -460.9319 &&
y <= 2861.4893) || (
x >= 1269.5886 &&
y >= -810.4507 &&
x <= 1288.8916 &&
y <= -800.5959) ||(
x >= 1086.6010 &&
y >= -683.6998 &&
x <= 1103.0225 &&
y <= -662.1832) || (
x >= 169.6879 &&
y >= -1392.6630 &&
x <= 281.5444 &&
y <= -1168.9749) ||(
x >= -828.3018 &&
y >= -2107.1487 &&
x <= -443.5032 &&
y <= -1855.6273) || (
x >= 1198.9982 &&
y >= -2407.0581 &&
x <= 1275.7397 &&
y <= -2341.6262) ||(
x >= 2293.1467 &&
y >= -1432.5869 &&
x <= 2331.7388 &&
y <= -1397.6476) || (
x >= 1915.3196 &&
y >= -1236.2382 &&
x <= 2016.6565 &&
y <= -1167.9290) ||(
x >= -2747.1692 &&
y >= -510.1152 &&
x <= -2663.2468 &&
y <= -411.4905) || (
x >= 1838.8041 &&
y >= 1463.2024 &&
x <= 2035.4167 &&
y <= 1703.0480) ||(
x >= 2049.6646 &&
y >= 1843.3029 &&
x <= 2119.9021 &&
y <= 1983.5464) || (
x >= 2094.9255 &&
y >= 1085.2852 &&
x <= 2179.1790 &&
y <= 1183.0610) ||(
x >= 2545.3718 &&
y >= 2347.7112 &&
x <= 2593.6794 &&
y <= 2403.8040
))
{
return 1;
}
return 0;
}

forward HileDenetle();
public HileDenetle(){
foreach(Player, i){
if(AnimCek(i)){
new Float:x,Float:y,Float:z;
GetPlayerPos(i,x,y,z);
if(z > 1.0){
if(!PosCek(i)){
SetTimerEx("_kickat_",100,false,"d",i);}}}}
return 1;
}

forward _kickat_(playerid);
public _kickat_(playerid){
Kick(playerid);
return 1;
}
Reply
#3

Quote:
Originally Posted by sampkinq
Посмотреть сообщение
Код:
#include <a_samp>
#include <foreach>
#pragma tabsize 0

public OnFilterScriptInit(){SetTimer("HileDenetle",1000,1);return 1;}

stock AnimCek(playerid)
{
if(!IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_ONFOOT){
new animcik[32], animismine[32];
GetAnimationName(GetPlayerAnimationIndex(playerid),animcik,32,animismine,32);
if(
!strcmp(animcik, "SWIM", true) &&
!strcmp(animismine, "SWIM_GLIDE", true)) return 1;
else
if(
!strcmp(animcik, "SWIM", true) &&
!strcmp(animismine, "SWIM_BREAST", true)) return 1;
else
if(
!strcmp(animcik, "SWIM", true) &&
!strcmp(animismine, "SWIM_CRAWL", true)) return 1;
else
if(
!strcmp(animcik, "SWIM", true) &&
!strcmp(animismine, "SWIM_DIVE_UNDER", true)) return 1;
else
if(
!strcmp(animcik, "SWIM", true) &&
!strcmp(animismine, "SWIM_DIVE_GLIDE", true)) return 1;
else
if(
!strcmp(animcik, "SWIM", true) &&
!strcmp(animismine, "SWIM_UNDER", true)) return 1;
else
if(
!strcmp(animcik, "SWIM", true) &&
!strcmp(animismine, "SWIM_TREAD", true)) return 1;
}
return 0;
}

stock PosCek(playerid)
{
new Float:x,Float:y,Float:z;
GetPlayerPos(playerid, x, y, z);if((
x >= -1408.0629 &&
y >= 2021.0587 &&
x <= -460.9319 &&
y <= 2861.4893) || (
x >= 1269.5886 &&
y >= -810.4507 &&
x <= 1288.8916 &&
y <= -800.5959) ||(
x >= 1086.6010 &&
y >= -683.6998 &&
x <= 1103.0225 &&
y <= -662.1832) || (
x >= 169.6879 &&
y >= -1392.6630 &&
x <= 281.5444 &&
y <= -1168.9749) ||(
x >= -828.3018 &&
y >= -2107.1487 &&
x <= -443.5032 &&
y <= -1855.6273) || (
x >= 1198.9982 &&
y >= -2407.0581 &&
x <= 1275.7397 &&
y <= -2341.6262) ||(
x >= 2293.1467 &&
y >= -1432.5869 &&
x <= 2331.7388 &&
y <= -1397.6476) || (
x >= 1915.3196 &&
y >= -1236.2382 &&
x <= 2016.6565 &&
y <= -1167.9290) ||(
x >= -2747.1692 &&
y >= -510.1152 &&
x <= -2663.2468 &&
y <= -411.4905) || (
x >= 1838.8041 &&
y >= 1463.2024 &&
x <= 2035.4167 &&
y <= 1703.0480) ||(
x >= 2049.6646 &&
y >= 1843.3029 &&
x <= 2119.9021 &&
y <= 1983.5464) || (
x >= 2094.9255 &&
y >= 1085.2852 &&
x <= 2179.1790 &&
y <= 1183.0610) ||(
x >= 2545.3718 &&
y >= 2347.7112 &&
x <= 2593.6794 &&
y <= 2403.8040
))
{
return 1;
}
return 0;
}

forward HileDenetle();
public HileDenetle(){
foreach(Player, i){
if(AnimCek(i)){
new Float:x,Float:y,Float:z;
GetPlayerPos(i,x,y,z);
if(z > 1.0){
if(!PosCek(i)){
SetTimerEx("_kickat_",100,false,"d",i);}}}}
return 1;
}

forward _kickat_(playerid);
public _kickat_(playerid){
Kick(playerid);
return 1;
}
thanks, Can you tell me how it works
Reply
#4

Quote:
Originally Posted by sampkinq
Посмотреть сообщение
Код:
#include <a_samp>
#include <foreach>
#pragma tabsize 0

public OnFilterScriptInit(){SetTimer("HileDenetle",1000,1);return 1;}

stock AnimCek(playerid)
{
if(!IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_ONFOOT){
new animcik[32], animismine[32];
GetAnimationName(GetPlayerAnimationIndex(playerid),animcik,32,animismine,32);
if(
!strcmp(animcik, "SWIM", true) &&
!strcmp(animismine, "SWIM_GLIDE", true)) return 1;
else
if(
!strcmp(animcik, "SWIM", true) &&
!strcmp(animismine, "SWIM_BREAST", true)) return 1;
else
if(
!strcmp(animcik, "SWIM", true) &&
!strcmp(animismine, "SWIM_CRAWL", true)) return 1;
else
if(
!strcmp(animcik, "SWIM", true) &&
!strcmp(animismine, "SWIM_DIVE_UNDER", true)) return 1;
else
if(
!strcmp(animcik, "SWIM", true) &&
!strcmp(animismine, "SWIM_DIVE_GLIDE", true)) return 1;
else
if(
!strcmp(animcik, "SWIM", true) &&
!strcmp(animismine, "SWIM_UNDER", true)) return 1;
else
if(
!strcmp(animcik, "SWIM", true) &&
!strcmp(animismine, "SWIM_TREAD", true)) return 1;
}
return 0;
}

stock PosCek(playerid)
{
new Float:x,Float:y,Float:z;
GetPlayerPos(playerid, x, y, z);if((
x >= -1408.0629 &&
y >= 2021.0587 &&
x <= -460.9319 &&
y <= 2861.4893) || (
x >= 1269.5886 &&
y >= -810.4507 &&
x <= 1288.8916 &&
y <= -800.5959) ||(
x >= 1086.6010 &&
y >= -683.6998 &&
x <= 1103.0225 &&
y <= -662.1832) || (
x >= 169.6879 &&
y >= -1392.6630 &&
x <= 281.5444 &&
y <= -1168.9749) ||(
x >= -828.3018 &&
y >= -2107.1487 &&
x <= -443.5032 &&
y <= -1855.6273) || (
x >= 1198.9982 &&
y >= -2407.0581 &&
x <= 1275.7397 &&
y <= -2341.6262) ||(
x >= 2293.1467 &&
y >= -1432.5869 &&
x <= 2331.7388 &&
y <= -1397.6476) || (
x >= 1915.3196 &&
y >= -1236.2382 &&
x <= 2016.6565 &&
y <= -1167.9290) ||(
x >= -2747.1692 &&
y >= -510.1152 &&
x <= -2663.2468 &&
y <= -411.4905) || (
x >= 1838.8041 &&
y >= 1463.2024 &&
x <= 2035.4167 &&
y <= 1703.0480) ||(
x >= 2049.6646 &&
y >= 1843.3029 &&
x <= 2119.9021 &&
y <= 1983.5464) || (
x >= 2094.9255 &&
y >= 1085.2852 &&
x <= 2179.1790 &&
y <= 1183.0610) ||(
x >= 2545.3718 &&
y >= 2347.7112 &&
x <= 2593.6794 &&
y <= 2403.8040
))
{
return 1;
}
return 0;
}

forward HileDenetle();
public HileDenetle(){
foreach(Player, i){
if(AnimCek(i)){
new Float:x,Float:y,Float:z;
GetPlayerPos(i,x,y,z);
if(z > 1.0){
if(!PosCek(i)){
SetTimerEx("_kickat_",100,false,"d",i);}}}}
return 1;
}

forward _kickat_(playerid);
public _kickat_(playerid){
Kick(playerid);
return 1;
}
You seriously need to learn to indent properly.
Remove that tabsize shit and INDENT!
Reply
#5

The lack of indentation makes baby jesus cry....

Anyway, what this code does is it checks during a timer if a player is doing a certain animation in this case all of the swimming ones.

Just gonna split the code and explain briefly, pretty self explanatory, the code itself though is not written very tidy....


Код:
//starts the timer "HileDenetle" whatever that is
public OnFilterScriptInit(){SetTimer("HileDenetle",1000,1);return 1;}

//This should of been above the stock (for obvious reasons)
forward HileDenetle();

public HileDenetle(){
foreach(Player, i){//loops through each player
if(AnimCek(i)){ //uses the animcek to see if the player is using a swimming anim
new Float:x,Float:y,Float:z;
GetPlayerPos(i,x,y,z); //gets the current player's position and saves it
if(z > 1.0){ //if the player is above height 1
if(!PosCek(i)){ //uses the another stock to check the players location, without it any player swimming would be kicked. If a player is not in one of the bodies of water defined in PosCek they would be kicked by the timer below
SetTimerEx("_kickat_",100,false,"d",i);}}}}
return 1;
}
//.


//This is the stock which checks which animation is happening, it will only check the defined ones ie: Swim_breast is the breaststroke anim.

stock AnimCek(playerid)
{
if(!IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_ONFOOT){
new animcik[32], animismine[32];
GetAnimationName(GetPlayerAnimationIndex(playerid),animcik,32,animismine,32);
if(
!strcmp(animcik, "SWIM", true) &&
!strcmp(animismine, "SWIM_GLIDE", true)) return 1;
else
if(
!strcmp(animcik, "SWIM", true) &&
!strcmp(animismine, "SWIM_BREAST", true)) return 1;
else
if(
!strcmp(animcik, "SWIM", true) &&
!strcmp(animismine, "SWIM_CRAWL", true)) return 1;
else
if(
!strcmp(animcik, "SWIM", true) &&
!strcmp(animismine, "SWIM_DIVE_UNDER", true)) return 1;
else
if(
!strcmp(animcik, "SWIM", true) &&
!strcmp(animismine, "SWIM_DIVE_GLIDE", true)) return 1;
else
if(
!strcmp(animcik, "SWIM", true) &&
!strcmp(animismine, "SWIM_UNDER", true)) return 1;
else
if(
!strcmp(animcik, "SWIM", true) &&
!strcmp(animismine, "SWIM_TREAD", true)) return 1;
}
return 0;
}
//These below are bodies of water, in this locations players will not be kicked, although it doesnt look like interiors are added here, maybe wrong
stock PosCek(playerid)
{
new Float:x,Float:y,Float:z;
GetPlayerPos(playerid, x, y, z);if((
x >= -1408.0629 &&
y >= 2021.0587 &&
x <= -460.9319 &&
y <= 2861.4893) || (
x >= 1269.5886 &&
y >= -810.4507 &&
x <= 1288.8916 &&
y <= -800.5959) ||(
x >= 1086.6010 &&
y >= -683.6998 &&
x <= 1103.0225 &&
y <= -662.1832) || (
x >= 169.6879 &&
y >= -1392.6630 &&
x <= 281.5444 &&
y <= -1168.9749) ||(
x >= -828.3018 &&
y >= -2107.1487 &&
x <= -443.5032 &&
y <= -1855.6273) || (
x >= 1198.9982 &&
y >= -2407.0581 &&
x <= 1275.7397 &&
y <= -2341.6262) ||(
x >= 2293.1467 &&
y >= -1432.5869 &&
x <= 2331.7388 &&
y <= -1397.6476) || (
x >= 1915.3196 &&
y >= -1236.2382 &&
x <= 2016.6565 &&
y <= -1167.9290) ||(
x >= -2747.1692 &&
y >= -510.1152 &&
x <= -2663.2468 &&
y <= -411.4905) || (
x >= 1838.8041 &&
y >= 1463.2024 &&
x <= 2035.4167 &&
y <= 1703.0480) ||(
x >= 2049.6646 &&
y >= 1843.3029 &&
x <= 2119.9021 &&
y <= 1983.5464) || (
x >= 2094.9255 &&
y >= 1085.2852 &&
x <= 2179.1790 &&
y <= 1183.0610) ||(
x >= 2545.3718 &&
y >= 2347.7112 &&
x <= 2593.6794 &&
y <= 2403.8040
))//lack of indents..................
{
return 1;
}
return 0;
}

//kick timer
forward _kickat_(playerid);
public _kickat_(playerid){
Kick(playerid);
return 1;
}
Very brief explination of what it does. its midnight and im gonna go bed. You shouldnt need to edit the code. Just remember to use TAB, in scripting its your best friend! So are //comments and /*more comments*/
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)