Qual o erro disso?
#1

Quais sгo meus erros aqui ? como posso melhorar esse sistema ?
Quando da /trabalhar ele diz que o cara ta de hack, help!!

pawn Код:
public VerificarHacks()
{
    new Float:health;
    new Float:colete;
    new Float:vidacarro;
    new veh;
//_________________________________________
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        GetPlayerArmour(i,colete);
        GetPlayerHealth(i,health);
        veh = GetPlayerVehicleID(i);
        GetVehicleHealth(veh, vidacarro);
        if (PlayerInfo[i][pAdmin] == 0 && gPlayerLogged[i] != 0)
        {
            if(TemAdmin >= 1)
            {
                if (health > 101.0)
                {
                    format(gstring, 128, "Atenзгo: %s estб com Hack de Vida",PlayerName(i));
                    ABroadCast(COLOR_YELLOW,gstring,1);
                }
                if (colete > 101.0)
                {
                    format(gstring, 128, "Atenзгo: %s estб com Hack de Colete",PlayerName(i));
                    ABroadCast(COLOR_YELLOW,gstring,1);
                }
                if (vidacarro > 1001.0)
                {
                    format(gstring, 128, "Atenзгo: %s estб com GodCar",PlayerName(i));
                    ABroadCast(COLOR_YELLOW,gstring,1);
                }
            }
            else if(TemAdmin == 0)
            {
                if (health > 101.0)
                {
                    format(gstring, 128, "Atenзгo todos: %s estб com Hack de Vida e foi kickado",PlayerName(i));
                    SendClientMessageToAllEx(COLOR_YELLOW, gstring);
                    Kick(i);
                }
                if (colete > 101.0)
                {
                    format(gstring, 128, "Atenзгo todos: %s estб com Hack de Colete e foi kickado",PlayerName(i));
                    SendClientMessageToAllEx(COLOR_YELLOW, gstring);
                    Kick(i);
                }
                if (vidacarro > 1001.0)
                {
                    format(gstring, 128, "Atenзгo todos: %s estб com GodCar e foi kickado",PlayerName(i));
                    SendClientMessageToAllEx(COLOR_YELLOW, gstring);
                    Kick(i);
                }
            }
        }
    }
    return 1;
}
Reply
#2

Troque
pawn Код:
TemAdmin >= 1
Por
pawn Код:
TemAdmin == 0
Acredito que seja isso
Reply
#3

Use assim, troque a variбvel de admin...

PHP код:
public VerificarHacks()
{
    new 
Float:health;
    new 
Float:colete;
    new 
Float:vidacarro;
    new 
veh;
//_________________________________________
    
for(new 0MAX_PLAYERSi++)
    {
        
GetPlayerArmour(i,colete);
        
GetPlayerHealth(i,health);
        
veh GetPlayerVehicleID(i);
        
GetVehicleHealth(vehvidacarro);
        if (
PlayerInfo[i][pAdmin] == && gPlayerLogged[i] != 0)
        {
            if(
TemAdmin >= 1)
            {
                if ((
health 101.0 || PlayerInfo[playerid][pAdmin] == 0))// Troque a variбvel PlayerInfo... pela sua de admin!
                
{
                    
format(gstring128"Atenзгo: %s estб com Hack de Vida",PlayerName(i));
                    
ABroadCast(COLOR_YELLOW,gstring,1);
                }
                if (
colete 101.0)
                {
                    
format(gstring128"Atenзгo: %s estб com Hack de Colete",PlayerName(i));
                    
ABroadCast(COLOR_YELLOW,gstring,1);
                }
                if (
vidacarro 1001.0)
                {
                    
format(gstring128"Atenзгo: %s estб com GodCar",PlayerName(i));
                    
ABroadCast(COLOR_YELLOW,gstring,1);
                }
            }
            else if(
TemAdmin == 0)
            {
                if ((
health 101.0 || PlayerInfo[playerid][pAdmin] == 0))// Troque a variбvel PlayerInfo... pela sua de admin!
                
{
                    
format(gstring128"Atenзгo todos: %s estб com Hack de Vida e foi kickado",PlayerName(i));
                    
SendClientMessageToAllEx(COLOR_YELLOWgstring);
                    
Kick(i);
                }
                if (
colete 101.0)
                {
                    
format(gstring128"Atenзгo todos: %s estб com Hack de Colete e foi kickado",PlayerName(i));
                    
SendClientMessageToAllEx(COLOR_YELLOWgstring);
                    
Kick(i);
                }
                if (
vidacarro 1001.0)
                {
                    
format(gstring128"Atenзгo todos: %s estб com GodCar e foi kickado",PlayerName(i));
                    
SendClientMessageToAllEx(COLOR_YELLOWgstring);
                    
Kick(i);
                }
            }
        }
    }
    return 
1;

Reply
#4

Nossa, me confundi totalmente, li TemAdmin como se fosse TeamAdmin. Deixa eu ver oque ta causando o problema... Se vocк fizer oque o bruno disse vai dar erro, vou postar certo.
pawn Код:
public VerificarHacks()
{
    new Float:health;
    new Float:colete;
    new Float:vidacarro;
    new veh;
//_________________________________________
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        GetPlayerArmour(i,colete);
        GetPlayerHealth(i,health);
        veh = GetPlayerVehicleID(i);
        GetVehicleHealth(veh, vidacarro);
        if (PlayerInfo[i][pAdmin] == 0 && gPlayerLogged[i] != 0)
        {
            if(TemAdmin >= 1)
            {
                if ((health > 101.0 && PlayerInfo[i][pAdmin] == 0))// Troque a variбvel PlayerInfo... pela sua de admin!
                {
                    format(gstring, 128, "Atenзгo: %s estб com Hack de Vida",PlayerName(i));
                    ABroadCast(COLOR_YELLOW,gstring,1);
                }
                if (colete > 101.0 && PlayerInfo[i][pAdmin] == 0)
                {
                    format(gstring, 128, "Atenзгo: %s estб com Hack de Colete",PlayerName(i));
                    ABroadCast(COLOR_YELLOW,gstring,1);
                }
                if (vidacarro > 1001.0 && PlayerInfo[i][pAdmin] == 0)
                {
                    format(gstring, 128, "Atenзгo: %s estб com GodCar",PlayerName(i));
                    ABroadCast(COLOR_YELLOW,gstring,1);
                }
            }
            else if(TemAdmin == 0)
            {
                if ((health > 101.0 && PlayerInfo[i][pAdmin] == 0))
                {
                    format(gstring, 128, "Atenзгo todos: %s estб com Hack de Vida e foi kickado",PlayerName(i));
                    SendClientMessageToAllEx(COLOR_YELLOW, gstring);
                    Kick(i);
                }
                if (colete > 101.0 && PlayerInfo[i][pAdmin] == 0)
                {
                    format(gstring, 128, "Atenзгo todos: %s estб com Hack de Colete e foi kickado",PlayerName(i));
                    SendClientMessageToAllEx(COLOR_YELLOW, gstring);
                    Kick(i);
                }
                if (vidacarro > 1001.0 && PlayerInfo[i][pAdmin] == 0)
                {
                    format(gstring, 128, "Atenзгo todos: %s estб com GodCar e foi kickado",PlayerName(i));
                    SendClientMessageToAllEx(COLOR_YELLOW, gstring);
                    Kick(i);
                }
            }
        }
    }
    return 1;
}
Reply
#5

Ahh й, coloquei os caracteres errados .
Reply
#6

Mas de qualquer jeito, nao sei se isso vai resolver. Porque ali antes ja tem "if (PlayerInfo[i][pAdmin] == 0 && gPlayerLogged[i] != 0)"... Vamos torcer para que resolva =)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)