GetVehicleVelocity
#1

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)
Reply
#2

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
Reply
#3

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]);
}
Reply
#4

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


Forum Jump:


Users browsing this thread: 1 Guest(s)