SA-MP Forums Archive
GetVehicleVelocity - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: GetVehicleVelocity (/showthread.php?tid=160051)



GetVehicleVelocity - ScottCFR - 15.07.2010

I'm working on an Anti-Speed hack system. I've never played around with GetVehicleVelocity, Can someone explain how I can use that to detect someones speed. (ex. If there going 180 KM they get banned)


Re: GetVehicleVelocity - iggy1 - 15.07.2010

I was thinking of this not long ago but ran into a problem, what if a player is falling in a vehicle and it bounces fast i think they'd be banned. So if someone has a solution id also be greatfull


Re: GetVehicleVelocity - Finn - 15.07.2010

Too lazy to search?

https://sampforum.blast.hk/showthread.php?pid=750094#pid750094

Quote:
Originally Posted by [XST]O_x
Посмотреть сообщение
Use what I'm using ^^
pawn Код:
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)) * 100.3;
    return floatround(ST[3]);
}



Re: GetVehicleVelocity - zSuYaNw - 15.07.2010

https://sampwiki.blast.hk/wiki/GetVehicleVelocity