Advertisement
zGabriel_Aguiar

[FS][FS]Sistema anti-lockon

Oct 18th, 2021
512
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.44 KB | None | 0 0
  1. #include <a_samp>
  2. #include <mobile> // e obrigatorio o uso da include mobile e pawnraknet
  3.  
  4. //DEFINES
  5. #define DIALOG_LOCKON    3773 //Aqui esta definido o id da dialog
  6.  
  7. #define FILTERSCRIPT
  8. //
  9.  
  10. #if defined FILTERSCRIPT
  11.  
  12. public OnFilterScriptInit()
  13. {
  14.     print("\n--------------------------------------");
  15.     print(" Anti-LockOn BY: zGabriel");
  16.     print("--------------------------------------\n");
  17.     return 1;
  18. }
  19.  
  20. public OnFilterScriptExit()
  21. {
  22.     return 1;
  23. }
  24.  
  25. #else
  26. #endif
  27.  
  28. public OnPlayerSpawn(playerid) //Public chamada sempre que o player spawna
  29. {
  30.     if(PlayerMobileInfo[playerid][isHaveAutoaim] == true) //Aqui verificamos se o player esta com a funcao 'Mira Automatica' habilitada
  31.     {
  32.         ShowPlayerDialog(playerid, DIALOG_LOCKON, DIALOG_STYLE_MSGBOX, "Anti-LockOn", "{FF0000}Voce foi kickado automaticamente pois esta usando lock on!\n{FFFFFF}Desative a opcao {FF0000}'Mira automatica' {FFFFFF}em seu samp launcher!", "OK",""); //Aqui criamos a dialog,  voce pode alterar os textos e cores
  33.         KickDelay(playerid); //Chamamos nossa stock KickDelay para dar tempo da mensagem ser mostrada ao player
  34.     }
  35.     return 1;
  36. }
  37.  
  38. stock KickDelay(playerid)
  39. {
  40.     SetTimerEx("KickMe", 1000, false, "d", playerid); //Criamos um timer  de 1 segundo, apos isso o player sera kickado
  41.     return 1;
  42. }
  43.  
  44. forward KickMe(playerid);
  45. public KickMe(playerid)
  46. {
  47.     return Kick(playerid); //Retornamos Kick para que o player seja kickado, esta funcao e padrao do samp
  48.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement