swiming
#1

How can I make that if player swim for 15 mins will get auto-kick and even swiming regular or with sprint.
Reply
#2

Set a timer that checks if the player is in the water/swimming and kick him, use the stock below.
pawn Код:
//This stock isn't mine, credits to who ever made it.
stock IsPlayerInWater( playerid )
{
    new anim = GetPlayerAnimationIndex( playerid );
    if (((anim >=  1538) && (anim <= 1542)) || (anim == 1544) || (anim == 1250) || (anim == 1062)) return 1;
    return 0;
}
Reply
#3

Quote:
Originally Posted by DaRk_RaiN
Посмотреть сообщение
Set a timer that checks if the player is in the water/swimming and kick him, use the stock below.
pawn Код:
//This stock isn't mine, credits to who ever made it.
stock IsPlayerInWater( playerid )
{
    new anim = GetPlayerAnimationIndex( playerid );
    if (((anim >=  1538) && (anim <= 1542)) || (anim == 1544) || (anim == 1250) || (anim == 1062)) return 1;
    return 0;
}
That could be a good function for anti-airbreaking hacks.. If I am not mistaken?
Reply
#4

Quote:
Originally Posted by Akira297
Посмотреть сообщение
That could be a good function for anti-airbreaking hacks.. If I am not mistaken?
Yes. If they're above Z height 0 (water height all over SA*) and they're playing a swimming animation, they're cheating.

* One exception is North of sherman dam, which is higher. Also, it's possible for a player to go lower than 0 (underwater and the quarry) so you'd have to detect whether they're underwater or not.
Reply
#5

Quote:
Originally Posted by Akira297
Посмотреть сообщение
That could be a good function for anti-airbreaking hacks.. If I am not mistaken?
It is, that + checking for the player velocity will give an accurate result.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)