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(GetPlayerWeapon(playerid) == WEAPON_PARACHUTE)
{
return 0;
}
if(GetPlayerSpeed(playerid) > 100)
{
SendClientMessage(playerid,-1,"Ksenon pozdrawia!"); return Kick(playerid);
}
return 1;
}
BUGS? If you will be hitted by cheater in car then you will get kicked.
https://www.youtube.com/watch?v=QGVk0scKsBs