SA-MP Forums Archive
[Ajuda] Novo crash. - 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] Novo crash. (/showthread.php?tid=540150)



Novo crash. - pivetesgames - 03.10.2014

Olб amigos, meu servidor estб sendo vitima de bugger crash, й um novo mod cleo, ele instalado tem a opзгo de apertar b+c para ativar, apуs fazer isso vocк pode travar a tela de todos do servidor. Alguйm sabe bloquear isso? Preciso muito, abraзos.


Soluзгo - Ygzeb - 03.10.2014

Teste:

pawn Код:
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
{
if(hittype == BULLET_HIT_TYPE_PLAYER)
{
if(!(-20.0 <= fX <= 20.0) || !(-20.0 <= fY <= 20.0) || !(-20.0 <= fZ <= 20.0))
{
Kick(playerid);
return 0;
}
}
return 1;
}
Boa sorte

Script criado por IstuntmanI.


Re: Novo crash. - zqkRazer - 03.10.2014

Provando do proprio veneno


Re: Novo crash. - pivetesgames - 03.10.2014

Quote:
Originally Posted by zqkRazer
Посмотреть сообщение
Provando do proprio veneno
Oque quis dizer com isso? Que eu ataco servidores?


Re: Soluзгo - pivetesgames - 03.10.2014

Quote:
Originally Posted by Ygzeb
Посмотреть сообщение
Teste:

pawn Код:
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
{
if(hittype == BULLET_HIT_TYPE_PLAYER)
{
if(!(-20.0 <= fX <= 20.0) || !(-20.0 <= fY <= 20.0) || !(-20.0 <= fZ <= 20.0))
{
Kick(playerid);
return 0;
}
}
return 1;
}
Boa sorte
Obrigado, irei testar!


Re: Novo crash. - pivetesgames - 03.10.2014

Quem estiver precisando, vou deixar como FS.

pawn Код:
#include <a_samp>

public OnFilterScriptInit()
{
    print("\n=====================================");
    print("          ANTI BUGGER CRASH            ");
    print("=====================================\n");
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

stock BadFloat(Float:x)
{
    if(x >= 10.0 || x <= -10.0)
        return true;

    return false;
}

public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
{
    if( hittype == BULLET_HIT_TYPE_PLAYER && (BadFloat(fX) || BadFloat(fY) || BadFloat(fZ)) )
    {
        Kick(playerid);
        return 0;
    }
       
    return true;
}
#EDIT DESCULPE PELO TRIPLE POST