Anti-Speedhack
#4

pawn Code:
stock GetPlayerSpeed(playerid)
{
    new Float:ST[4];
    if(IsPlayerInAnyVehicle(playerid))
    GetVehicleVelocity(GetPlayerVehicleID(playerid),ST[0],ST[1],ST[2]);
    else GetPlayerVelocity(playerid,ST[0],ST[1],ST[2]);
    ST[3] = floatsqroot(floatpower(floatabs(ST[0]), 2.0) + floatpower(floatabs(ST[1]), 2.0) + floatpower(floatabs(ST[2]), 2.0)) * 179.28625;
    return floatround(ST[3]);
}
pawn Code:
public OnPlayerUpdate(playerid)
{
    if(GetPlayerSpeed > /*your speed limit*/) return Kick(playerid);
    return 1;
}
Reply


Messages In This Thread
Anti-Speedhack - by ScottCFR - 07.08.2010, 18:12
Re: Anti-Speedhack - by Hiddos - 07.08.2010, 18:13
Re: Anti-Speedhack - by Stepashka - 07.08.2010, 18:18
Re: Anti-Speedhack - by [XST]O_x - 07.08.2010, 18:31
Re: Anti-Speedhack - by Kar - 07.08.2010, 18:33
Re: Anti-Speedhack - by [XST]O_x - 07.08.2010, 18:34
Re: Anti-Speedhack - by Kar - 07.08.2010, 18:39
Re: Anti-Speedhack - by ScottCFR - 07.08.2010, 19:48
Re: Anti-Speedhack - by Conroy - 07.08.2010, 19:53
Re: Anti-Speedhack - by DiddyBop - 07.08.2010, 20:01

Forum Jump:


Users browsing this thread: 1 Guest(s)