SA-MP Forums Archive
[Include] Anti-Airbreak/Teleport - 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)
+----- Forum: Lançamentos/Releases (https://sampforum.blast.hk/forumdisplay.php?fid=56)
+----- Thread: [Include] Anti-Airbreak/Teleport (/showthread.php?tid=545724)



Anti-Airbreak/Teleport - ForT - 10.11.2014

Anti AirBreak/Teleport


A pedido de um amigo, fiz essa include que detecta quando um player usa AirBreak ou Teleport!

Video de demonstraзгo:

[ame]www.youtube.com/watch?v=ODhcGtKKKpo[/ame]

Gamemode testado:
pawn Код:
#include <a_samp>
#include <AntiAirbreak>
#include <zcmd>

main()
{}

new Float:randomPos[][] =
{
{-2237.6675,2353.6357,4.9804}, // 1
{-2244.4297,2382.6162,5.0651}, // 2
{-2280.8123,2288.3540,4.9592}, // 3
{-2349.1038,2422.4600,7.3348}, // 4
{-2379.6294,2443.7397,10.1694}, // 5
{-2386.5432,2446.7439,10.1694}, // 6
{-2408.1724,2454.0754,13.0031}, // 7
{-2472.1128,2450.4846,17.3230}, // 8
{-2479.6860,2449.3577,17.3230}, // 9
{-2422.2366,2492.0024,13.1417}, // 10
{-2446.1724,2491.9753,15.3203}, // 11
{-2464.5906,2490.5576,16.8125}, // 12
{-2478.8467,2488.8369,18.2300}, // 13
{-2446.7429,2512.4402,15.7003}, // 14
{-2479.0059,2508.9224,17.7910}, // 15
{-2381.9663,2407.1270,8.8858}, // 16
{-2420.4670,2406.6948,13.0409}, // 17
{-2482.6694,2406.4666,17.1154}, // 18
{-2437.3914,2353.8271,4.9609}, // 19
{-2455.5942,2254.1738,4.9807}, // 20
{-2485.4236,2272.1384,4.9844}, // 21
{-2493.9551,2272.2332,4.9537}, // 22
{-2485.5320,2288.5393,4.9844}, // 23
{-2493.8901,2288.4854,4.9844}, // 24
{-2510.8262,2276.7490,4.9844}, // 25
{-2520.0254,2281.3076,4.9844}, // 26
{-2523.5359,2239.6621,5.3671}, // 27
{-2551.8118,2267.2979,5.4490}, // 28
{-2537.5444,2319.4932,4.9844}, // 29
{-2518.5354,2320.1204,4.9844}, // 30
{-2501.3713,2319.2898,4.9844}, // 31
{-2478.4834,2318.5718,4.9844}, // 32
{-2491.0913,2363.3721,10.2724}, // 33
{-2519.1113,2339.8892,4.9844}, // 34
{-2522.5203,2339.7744,4.9844}, // 35
{-2538.6680,2339.7317,4.9798}, // 36
{-2542.5051,2339.8647,4.9796}, // 37
{-2582.4805,2300.4995,7.0029}, // 38
{-2583.2078,2308.0552,7.0029}, // 39
{-2626.8638,2283.4148,8.3086}, // 40
{-2626.3899,2292.0630,8.3048}, // 41
{-2626.1743,2309.9878,8.3031}, // 42
{-2626.2063,2318.3826,8.3033}, // 43
{-2636.8171,2334.5730,8.4725}, // 44
{-2636.2891,2351.8054,8.5170}, // 45
{-2632.4487,2375.7893,9.0227}, // 46
{-2634.8933,2402.7507,11.2624}, // 47
{-2633.4346,2410.8716,13.9902}, // 48
{-2598.1265,2357.0999,9.8830}, // 49
{-2598.0171,2364.6636,9.8830} // 50
};

public OnPlayerConnect(playerid)
{
    return 1;
}

public OnPlayerAirBreak(playerid){

    SendClientMessage(playerid, 0xFF0000FF, " - AirBreak/Teleport detectado !");

    return 1;
}

command(tele, playerid, params[]){

    new
        rdon = random(sizeof(randomPos))
    ;

    SetPlayerPos(playerid, randomPos[rdon][0], randomPos[rdon][1], randomPos[rdon][2]);

    return 1;
}

public OnPlayerSpawn(playerid)
{
    SetPlayerInterior(playerid,0);
    TogglePlayerClock(playerid,0);
    return 1;
}

SetupPlayerForClassSelection(playerid)
{
    SetPlayerInterior(playerid,14);
    SetPlayerPos(playerid,258.4893,-41.4008,1002.0234);
    SetPlayerFacingAngle(playerid, 270.0);
    SetPlayerCameraPos(playerid,256.0815,-43.0475,1004.0234);
    SetPlayerCameraLookAt(playerid,258.4893,-41.4008,1002.0234);
}

public OnPlayerRequestClass(playerid, classid)
{
    SetupPlayerForClassSelection(playerid);
    return 1;
}

public OnGameModeInit()
{
    AddPlayerClass(265,1958.3783,1343.1572,15.3746,270.1425,0,0,0,0,-1,-1);
    return 1;
}
Instalaзгo:

Salve o arquivo na sua pasta de includes
Depois coloque no seu GameMode:
pawn Код:
//No topo
#include <AntiAirbreak>


//No fim
public OnPlayerAirBreak(playerid)
{
    SendClientMessage(playerid, 0xFF0000FF, " - AirBreak/Teleport detectado !");
    return 1;
}
OBS: й necessбrio:
Include - Foreach, By: ******

Download:

http://pastebin.com/LvXBJDHB


Re: Anti-Airbreak/Teleport - TheGoldenHelmet - 10.11.2014

Gostei.

Em um servidor com 20ms+ de ping vai ter problema, nem tudo que й enviado para o jogador й executado exatamente no momento em que foi requerido pelo servidor.
Recomendo que use a variavel aB_Info[playerid][aB_Aguardo] nas funзхes aB_SetPlayerPos e aB_PutPlayerInVehicle ou vai ter grande problema com reports invбlidos no servidor.

@Edit

Olhando o cуdigo melhor eu vi que jб tinha adicionado isso, sу aumenta um pouco o tempo.


Re: Anti-Airbreak/Teleport - Artista - 10.11.2014

Bom trabalho.
+REP


Re: Anti-Airbreak/Teleport - Locky_ - 10.11.2014

Bom no vнdeo parece funcionar bem. Mas serб que seria funcional tambйm com mais players e em hosting com ping entre 200 e 400?

(+Rep pelo bom trabalho)


Re: Anti-Airbreak/Teleport - PT - 10.11.2014

Porque nao usou um SetTimerEx ?

Acho que seria mais otimizado e seria melhor na minha opiniao no uso para player lagados de ping..

De qualquer forma, bom trabalho.


Re: Anti-Airbreak/Teleport - ReyMysterio - 10.11.2014

Eu gostava de ter um anti-teleport no meu servidor mas o pior й que se der lag no servidor poderб ser prejudicial, portanto eu atй prefiro que a equipe fique vigiando para banir os players. Mas atй й possнvel sу colocando para chegar mensagem para o player e aн sim talvez usasse.

Parabйns pelo bom trabalho!

+REP


Re: Anti-Airbreak/Teleport - ForT - 10.11.2014

Vlw a todos!

- Pensando em ping alto, dei uma mudada no code!


Re: Anti-Airbreak/Teleport - WLSF - 18.11.2014

fiquei com duvidas sobre o funcionamento, mas, parabйns pela tentativa, й sempre bom reforзar as ideias para essa бrea do sa-mp.


Re: Anti-Airbreak/Teleport - Breno Da Silva Pereira - 22.11.2014

Testado em R4 Nгo Funciona de todos os que jб foram postados aqui o ъnico que funciona e o do pbanticheater


Re: Anti-Airbreak/Teleport - ipsLuan - 22.11.2014

O cуdigo ficou fantбstico, parabйns!


Re: Anti-Airbreak/Teleport - iTakelot - 28.06.2015

Parabйns fico muito bom o script vou utilizar no meu gm.


Re: Anti-Airbreak/Teleport - IgorLuiz - 01.07.2015

Muito Bom man. Parabйns! +rep


Re: Anti-Airbreak/Teleport - iTakelot - 01.07.2015

Olha a data do poste man !


Re: Anti-Airbreak/Teleport - AmauterInPawn - 02.07.2015

Quote:
Originally Posted by iTakelot
View Post
Olha a data do poste man !
Foi tu que reviveu esse topico de 2014 a poucos dias...


Re: Anti-Airbreak/Teleport - iTakelot - 02.07.2015

sim estou apenas alertando.