RZC.RO

Ne-am mutat pe www.rzc.ro

RZC.RO

Ne-am mutat pe www.rzc.ro
RZC.RO

[Tutorial/SA:MP] Anti Reclama Online11[Tutorial/SA:MP] Anti Reclama 0Yn7vVa uram Calduros Bine ati venit! Fii activ! [Tutorial/SA:MP] Anti Reclama 0Yn7v[Tutorial/SA:MP] Anti Reclama Online11
[Tutorial/SA:MP] Anti Reclama Online11[Tutorial/SA:MP] Anti Reclama 0Yn7vCautam ServereCs 1.6 [Tutorial/SA:MP] Anti Reclama 0Yn7v[Tutorial/SA:MP] Anti Reclama Online11 [Tutorial/SA:MP] Anti Reclama Online11[Tutorial/SA:MP] Anti Reclama 0Yn7vRecrutam ClanuriCs 1.6 [Tutorial/SA:MP] Anti Reclama 0Yn7v[Tutorial/SA:MP] Anti Reclama Online11
[Tutorial/SA:MP] Anti Reclama Online11[Tutorial/SA:MP] Anti Reclama 0Yn7vSuntem in cautare de STAFF! Yahoo:Smoke_flash97[Tutorial/SA:MP] Anti Reclama 0Yn7v[Tutorial/SA:MP] Anti Reclama Online11

    [Tutorial/SA:MP] Anti Reclama

    NarciS
    NarciS
    Fondator
     Fondator


    Mesaje : 395
    Puncte : 1126
    Reputatie : 28
    Data de inscriere : 30/04/2012
    Varsta : 27
    Localizare : Alba-Iulia

    [Tutorial/SA:MP] Anti Reclama Empty [Tutorial/SA:MP] Anti Reclama

    Mesaj Scris de NarciS Mar Mai 19, 2015 3:57 pm

    Tutorial Anti-Reclama by FLR!

    1.Cauta:

    public OnPlayerText(playerid, text[])

    Aici adaugi asta:

    //////////////////
    // * Anti * //
    // * Reclama * //
    /////////////////
    if(GoIP(text))
    {
    for(new i=0; i<MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i))
    {
    new reclama[MAX_PLAYER_NAME];
    GetPlayerName(playerid, reclama, sizeof(reclama));
    format(string, sizeof(string), "[Server]: %s (%d) was banned, reason: Reclama",reclama,i);
    SendClientMessageToAll(0xFF6347AA,string);
    SendClientMessage(playerid, 0xFF0000FF, "[ENG]:You have banned , because you write an IP Adress.");
    SendClientMessage(playerid, 0xFF0000FF, "[RO]:Tu ai fost bannad pentru ca ai scris o adresa IP.");
    PlayerInfo[giveplayerid][pLevel] = -999;
    Ban(giveplayerid);
    BanLog(string);
    }
    else
    {
    SendClientMessage(playerid, 0xFF0000FF, "[ENG]:You are not fully connected.");
    SendClientMessage(playerid, 0xFF0000FF, "[RO]:Inca nu te-ai conectat.");
    }
    }
    return 1;
    }

    2. La sfarsitul GM-ului adaugati:

    GoIP(StrToChk[])
    {
    new IpLevel = 0;
    for(new a = 0; a < strlen(StrToChk); a++)
    {
    switch(IpLevel)
    {
    case 0:
    {
    if(IsNum(StrToChk[a])) IpLevel++;
    }
    case 1, 2:
    {
    if(IsNum(StrToChk[a])) IpLevel++;
    else if(StrToChk[a] == '.') IpLevel = 4;
    else IpLevel = 0;
    }
    case 3:
    {
    if(StrToChk[a] == '.') IpLevel++;
    else IpLevel = 0;
    }
    case 4:
    {
    if(IsNum(StrToChk[a])) IpLevel++;
    else IpLevel = 0;
    }
    case 5, 6:
    {
    if(IsNum(StrToChk[a])) IpLevel++;
    else if(StrToChk[a] == '.') IpLevel = 8;
    else IpLevel = 0;
    }
    case 7:
    {
    if(StrToChk[a] == '.') IpLevel++;
    else IpLevel = 0;
    }
    case 8:
    {
    if(IsNum(StrToChk[a])) IpLevel++;
    else IpLevel = 0;
    }
    case 9, 10:
    {
    if(IsNum(StrToChk[a])) IpLevel++;
    else if(StrToChk[a] == '.') IpLevel = 12;
    else IpLevel = 0;
    }
    case 11:
    {
    if(StrToChk[a] == '.') IpLevel++;
    else IpLevel = 0;
    }
    case 12:
    {
    if(IsNum(StrToChk[a])) return 1;
    else IpLevel = 0;
    }
    }
    }
    return 0;
    }

    IsNum(textchar)
    {
    if(textchar == '0') return 1;
    if(textchar == '1') return 1;
    if(textchar == '2') return 1;
    if(textchar == '3') return 1;
    if(textchar == '4') return 1;
    if(textchar == '5') return 1;
    if(textchar == '6') return 1;
    if(textchar == '7') return 1;
    if(textchar == '8') return 1;
    if(textchar == '9') return 1;
    return 0;
    }


    3. Iar acum pentru ca anti-reclama sa mearga si la celelalte chaturi [ /o /a /n /f /news ...etc]

    Adaugati la fiecare chat asta:

    if(FindIP(result)) /// Anti-Reclama
    {
    new advertiser[MAX_PLAYER_NAME];
    GetPlayerName(playerid, advertiser, sizeof(advertiser));
    format(string, sizeof(string), "[Server]: %s was kicked by AdminBot, reason: Server advertising.",advertiser);
    SendClientMessageToAll(COLOR_RED,string);
    KickLog(string);
    Kick(playerid);
    return 1;
    }

      Data/ora curentă este: Joi Mai 09, 2024 2:26 am