[Ajuda] mensagem enviando 4- nгo aparecer...
#1

galera eu uso a include pB anti hack,e a funзгo de enviar mensagens й essa:

pawn Код:
if(hackid == PLAYER_BOT_LEVEL3) {
        format(string, sizeof(string), "AdmCmd: %s foi banido por [ADMINBOT], Motivo: Tentou invadir o servidor com BOTS! (%d-%d-%d)", PlayerName(playerid),day,month,year);
        BanLog(string);
        format(string, sizeof(string), "AdmCmd: %s foi banido por [ADMINBOT], Motivo: Tentou invadir o servidor com BOTS!", PlayerName(playerid));
        SendClientMessageToAll(COLOR_LIGHTRED, string);
        PlayerInfo[playerid][pBan] = 1;
        TextDrawShowForPlayer(playerid, TextBan[playerid]);
        SBan(playerid,"Tentou invadir o SV com MUITOS BOTS!", PlayerName(playerid));
    }

    if(hackid == PLAYER_DEATHFLOOD_LEVEL1 || PLAYER_DEATHFLOOD_LEVEL2 == hackid || PLAYER_DEATHFLOOD_LEVEL3 == hackid) {
        format(string, sizeof(string), "AdmCmd: %s Pode estar utilizando Fake Kill Hack! (Se floodar + de 4x /tv!)", PlayerName(playerid));
        ABroadCast(0xFF8282AA2,string,1);
    }
    if(hackid == PLAYER_STATE_HACK && PlayerInfo[playerid][pAdmin] == 0) {
        format(string, sizeof(string), "AdmCmd: %s Pode estar utilizando State Hack! (Se floodar + de 4x /tv!)", PlayerName(playerid));
        ABroadCast(0xFF8282AA2,string,1);
    }

    if(hackid == PLAYER_SCORE_HACK && PlayerInfo[playerid][pAdmin] == 0) {
        format(string, sizeof(string), "AdmCmd: %s Pode estar utilizando Score Hack! (Se floodar + de 4x /tv!)", PlayerName(playerid));
        ABroadCast(0xFF8282AA2,string,1);
    }
    if(hackid == PLAYER_PUBLISH_TEXT && PlayerInfo[playerid][pAdmin] == 0) {
        format(string, sizeof(string), "AdmCmd: %s Pode estar Divulgando Um Servidor! (Se floodar + de 4x /tv!)", PlayerName(playerid));
        ABroadCast(0xFF8282AA2,string,1);
    }
    if(hackid == PLAYER_TELEPORT_HACK) {
        format(string, sizeof(string), "AdmCmd: %s Pode estar utilizando Hack de Teleporte! (Se floodar + de 4x /tv!)", PlayerName(playerid));
        ABroadCast(0xFF8282AA2,string,1);
    }
    if(hackid == PLAYER_WEAPON_HACK && PlayerInfo[playerid][pAdmin] == 0) {
        format(string, sizeof(string), "AdmCmd: %s Pode estar utilizando Hack para pegar Armas! (Se floodar muito..o cara nгo tem 2h de jogo se floodar direto... /tv)", PlayerName(playerid));
        ABroadCast(0xFF8282AA2,string,1);
    }
    if(hackid == PLAYER_NORELOAD_HACK && PlayerInfo[playerid][pAdmin] == 0) {
        format(string, sizeof(string), "AdmCmd: %s Pode estar utilizando No Reload Hack! (Se floodar + de 4x /tv!)", PlayerName(playerid));
        ABroadCast(0xFF8282AA2,string,1);
    }
    if(hackid == PLAYER_AIRBREAK_HACK && PlayerInfo[playerid][pAdmin] == 0) {
        format(string, sizeof(string), "AdmCmd: %s Pode estar utilizando AirBreak Hack! (Se floodar + de 4x /tv!)", PlayerName(playerid));
        ABroadCast(0xFF8282AA2,string,1);
    }
    if(hackid == PLAYER_SPIDER_HACK && PlayerInfo[playerid][pAdmin] == 0) {
        format(string, sizeof(string), "AdmCmd: %s Pode estar utilizando Spider Car Hack! (Se floodar + de 4x /tv!)", PlayerName(playerid));
        ABroadCast(0xFF8282AA2,string,1);
    }
    if(hackid == PLAYER_CPRACE_HACK && PlayerInfo[playerid][pAdmin] == 0) {
        format(string, sizeof(string), "AdmCmd: %s Pode estar utilizando CPrace Hack! (Se floodar + de 4x /tv!)", PlayerName(playerid));
        ABroadCast(0xFF8282AA2,string,1);
    }
    if(hackid == PLAYER_SPEED_HACK && PlayerInfo[playerid][pAdmin] == 0) {
        format(string, sizeof(string), "AdmCmd: %s Pode estar utilizando Speed Hack! (Se floodar + de 4x /tv!)", PlayerName(playerid));
        ABroadCast(0xFF8282AA2,string,1);
    }
    if(hackid == PLAYER_FLY_HACK && PlayerInfo[playerid][pAdmin] == 0) {
        format(string, sizeof(string), "AdmCmd: %s Pode estar utilizando Fly Hack! (Se floodar + de 4x /tv!)", PlayerName(playerid));
        ABroadCast(0xFF8282AA2,string,1);
    }

    return true;
}
mas ele sу realmente acusa hack se ele floodar a msg de hack 4x,se ele mandar menos й bug...entгo eu queria fazer algo pra ele detectar,se a mensagem for enviada - de 4 vezes ele nгo enviar a mensagem...teria como fazer?
Reply
#2

Cria uma contagem com variбveis...

Se a contagem for + de 4 mostra a mensagem e kika...

pawn Код:
new contagem[MAX_PLAYERS][hackid];

if(hackid == PLAYER_TELEPORT_HACK)
{
    contagem[playerid][PLAYER_TELEPORT_HACK] ++;
    if(contagem[playerid][PLAYER_TELEPORT_HACK] >= 4)
    {
        // envia mensagem
    }
Reply
#3

Код:
C:\Users\Sonic\Desktop\euamovc.pwn(77423) : error 008: must be a constant expression; assumed zero
C:\Users\Sonic\Desktop\euamovc.pwn(77423) : error 009: invalid array size (negative, zero or out of bounds)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase
linha: new contagem[MAX_PLAYERS][hackid];
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)