Quantcast
Channel: SA-MP Forums - Filterscripts
Viewing all articles
Browse latest Browse all 595

[FilterScript] Basic antislapper

$
0
0
This script will not be executed when you are jump out of vehicle or falling down.
I have tested GetPlayerSpeed in different situations and there is never value higher for 350 for speed.


Code:

#include <a_samp>

stock GetPlayerSpeed(playerid)
{
        if(playerid != INVALID_PLAYER_ID)
        {
                new Float:Pos[3],Float:PS;
                GetPlayerVelocity(playerid, Pos[0], Pos[1], Pos[2]);
                PS = floatsqroot(Pos[0]*Pos[0] + Pos[1]*Pos[1] + Pos[2]*Pos[2])*200;
                return floatround(PS,floatround_round);
        }
        return INVALID_PLAYER_ID;
}

public OnPlayerUpdate(playerid)
{
    if(GetPlayerSpeed(playerid) > 350)
    {
    //reakcja na cheata
    }
    return 1;
}


Viewing all articles
Browse latest Browse all 595

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>