[AJUDA] Erro?
#1

Aee pessoal eu tava fazeno um Anti-WeaponHack. Fiz sertin quando fui testa, eu nem pegava a arma e falava que eu tava de cheater. Olhem:

pawn Код:
new ArmasLiberadas[] = {0, 1, 4, 5, 6, 24, 25, 29, 30, 31};
forward AntiShit();

public OnGameModeInit()
{
    SetTimer("AntiShit", 1, true);
    return 1;
}

public AntiShit()
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        AntiMoneyHack(i);
        AntiWeaponHack(i);
    }
    return 1;
}

AntiWeaponHack(playerid)
{
    new string[256], nome[MAX_PLAYER_NAME];
    if(!ArmasLiberadas[GetPlayerWeapon(playerid)])
    {
        GetPlayerName(playerid, nome, sizeof(nome));
        ResetPlayerWeapons(playerid);
        format(string, sizeof(string), "[SERVER] %s foi banido pela CPU. (Razгo: Weapon-Hack)", nome);
        SendClientMessageToAll(COR_CINZA, string);
        //Ban(playerid);
        return 1;
    }
    return 1;
}
Reply
#2

tenta:
pawn Код:
#include <a_samp>

new ArmasLiberadas[10][0] = {
"0",
"1",
"4",
"5",
"6",
"24",
"25",
"29",
"30",
"31"
};
forward AntiShit();

public OnGameModeInit()
{
    SetTimer("AntiShit", 1, true);
    return 1;
}

public AntiShit()
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
//        AntiMoneyHack(i);
        AntiWeaponHack(i);
    }
    return 1;
}

AntiWeaponHack(playerid)
{
    new string[256], nome[MAX_PLAYER_NAME];
    if(!GetPlayerWeapon(playerid) == ArmasLiberadas[0][0])
    {
        GetPlayerName(playerid, nome, sizeof(nome));
        ResetPlayerWeapons(playerid);
        format(string, sizeof(string), "[SERVER] %s foi banido pela CPU. (Razгo: Weapon-Hack)", nome);
        SendClientMessageToAll(COR_CINZA, string);
        //Ban(playerid);
        return 1;
    }
    return 1;
}
Reply
#3

Код:
warning 213: tag mismatch
na linha
pawn Код:
if(!GetPlayerWeapon(playerid) == ArmasLiberadas[0][0])
Reply
#4

pawn Код:
if(GetPlayerWeapon(playerid) != ArmasLiberadas[0][0])
Reply
#5

continuo com o mesmo problema e ainda travo meu gta --''

e nem spawnaaaaaa
Reply
#6

nessa linha:

pawn Код:
if(!GetPlayerWeapon(playerid) == ArmasLiberadas[0][0])
tente colocar:

pawn Код:
if(GetPlayerWeapon(playerid) != ArmasLiberadas[0][0])
Reply
#7

Tenta assim>
pawn Код:
forward AntiShit();

public OnGameModeInit()
{
    SetTimer("AntiShit", 1, true);
    return 1;
}

public AntiShit()
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
//        AntiMoneyHack(i);
        AntiWeaponHack(i);
    }
    return 1;
}

AntiWeaponHack(playerid)
{
    new string[256], nome[MAX_PLAYER_NAME];
    if(GetPlayerWeapon(playerid) != 0 || 1 || 4 || 5 || 6 || 24 || 25 || 29 || 30 || 31 )
    {
        GetPlayerName(playerid, nome, sizeof(nome));
        ResetPlayerWeapons(playerid);
        format(string, sizeof(string), "[SERVER] %s foi banido pela CPU. (Razгo: Weapon-Hack)", nome);
        SendClientMessageToAll(COR_CINZA, string);
        //Ban(playerid);
        return 1;
    }
    return 1;
}
Reply
#8

coloca em onplayerupdate й mais seguro
Reply
#9

os meus anti-shit tudo paro de funciona do nada --''. que raiva
Reply
#10

Anti_Shit sahsuahus anti-merda sahsuahsu
eu fasco cada if para uma arma assim nunk buga e defino sу para adm usar arma bloqueada ai nгo buga
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)