SA-MP Forums Archive
[Ajuda] Anti Speed Hacker... - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Anti Speed Hacker... (/showthread.php?tid=360003)



Anti Speed Hacker... - Mercurio - 16.07.2012

Jб й possнvel scriptar algo que detecta a velocidade de um player no modo apй?
Exemplo se ele estiver apй em 70 km/h ele ser banido... ( Tirando a situaзгo que ele possa estar caindo de um local ).


Re: Anti Speed Hacker... - ViniBorn - 16.07.2012

Claro que й possнvel.


Re: Anti Speed Hacker... - Mercurio - 16.07.2012

Quote:
Originally Posted by Viniborn
Посмотреть сообщение
Claro que й possнvel.
Alguma base?


Re: Anti Speed Hacker... - Kuddy - 16.07.2012

Nгo se esqueзa tambйm de retirar se ele nгo estб de surf. So to alertando, nao sei como geta a velocidade, mas й possнvel por meio de cбlculos.

@edit tenta isso https://sampwiki.blast.hk/wiki/GetPlayerVelocity


Re: Anti Speed Hacker... - Mercurio - 16.07.2012

Quote:
Originally Posted by Kuddy
Посмотреть сообщение
Nгo se esqueзa tambйm de retirar se ele nгo estб de surf. So to alertando, nao sei como geta a velocidade, mas й possнvel por meio de cбlculos.

@edit tenta isso https://sampwiki.blast.hk/wiki/GetPlayerVelocity
Ok, obrigado


Re: Anti Speed Hacker... - leonardo1434 - 16.07.2012

Estб funзгo pega a velocidade.(crйditos ao criador)
pawn Код:
stock GetPlayerSpeed(playerid) {
    new
        Float: vX = Float: GetPlayerVehicleID(playerid),
        Float: vY,
        Float: vZ
    ;
    if(_: vX) {
        GetVehicleVelocity(_: vX, vX, vY, vZ);
    } else {
        GetPlayerVelocity(playerid, vX, vY, vZ);
    }
    vX *= vX, vY *= vY, vZ *= vZ;
    return (floatsqroot(vX + vY + vZ) * 200.0);
}



Re: Anti Speed Hacker... - Lucas Carneiro™ - 16.07.2012

Cria um Timer assim que o Player entrar no veнculo, E na public deste timer, Gete a velocidade do veiculo que ele esteja, Pegue a velocidade, Faзa uma if(... se estiver mais que X ban nele