[Ajuda] Com problema
#1

Bom da esse erro na hora de compilar:
C:\Users\usuario\Desktop\samp server\Game Mode RPG SF\filterscripts\Ant.pwn(63) : error 017: undefined symbol "playerid"
C:\Users\usuario\Desktop\samp server\Game Mode RPG SF\filterscripts\Ant.pwn(70) : warning 209: function "weaponanti" should return a value
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.
FS:
pawn Код:
//anti-cheat by viper
//so far only 1 hack is covered but more is being developed
//please dont remove credits


#include <a_samp>


#define FILTERSCRIPT

#if defined FILTERSCRIPT

#define COLOR_RED 0xFF0000AA

new banning[MAX_PLAYERS];

forward banningtimer();//timer for when getting banned
forward weaponanti();//checks if a player has an illegal weapon

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" Anti-cheat by viper");
    print("--------------------------------------\n");

    SetTimer("weaponanti",5000,1);
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

#endif

public OnPlayerConnect(playerid)
{
    SendClientMessage(playerid,COLOR_RED,"Este Servidor й Protegido!Nгo uso Cheats ou qualquer coisa do tipo.");
    return 1;
}

public banningtimer()
{
    for (new i = 0; i < MAX_PLAYERS; i++)
    {
       if(banning[i] == 1)
     {
        Ban(i);
     }
    }
}

public weaponanti()
{
    for (new i = 0; i < MAX_PLAYERS; i++)
    {
     if (GetPlayerWeapon(i) == 38 || GetPlayerWeapon(i) == 35 || GetPlayerWeapon(i) == 36)
     {
       new pname[200];
       new string[200];
       GetPlayerName(i, pname, sizeof(pname));
       if(IsPlayerAdmin(playerid)) return false;
       format(string, sizeof(string), "(ANTI-CHEAT BAN) %s has been banned by the anti-cheat system for weapon hacking", pname);
       SendClientMessageToAll(COLOR_RED,string);
       SetTimer("banningtimer",2000,0);
       banning[i] =1;
       }
     }
}
Reply
#2

pawn Код:
//anti-cheat by viper
//so far only 1 hack is covered but more is being developed
//please dont remove credits


#include <a_samp>


#define FILTERSCRIPT

#if defined FILTERSCRIPT

#define COLOR_RED 0xFF0000AA

new banning[MAX_PLAYERS];

forward banningtimer();//timer for when getting banned
forward weaponanti();//checks if a player has an illegal weapon

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" Anti-cheat by viper");
    print("--------------------------------------\n");

    SetTimer("weaponanti",5000,1);
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

#endif

public OnPlayerConnect(playerid)
{
    SendClientMessage(playerid,COLOR_RED,"Este Servidor й Protegido!Nгo uso Cheats ou qualquer coisa do tipo.");
    return 1;
}

public banningtimer()
{
    for (new i = 0; i < MAX_PLAYERS; i++)
    {
        if(banning[i] == 1)
        {
            Ban(i);
        }
    }
    return 1;
}

public weaponanti()
{
    for (new i = 0; i < MAX_PLAYERS; i++)
    {
        if (GetPlayerWeapon(i) == 38 || GetPlayerWeapon(i) == 35 || GetPlayerWeapon(i) == 36)
        {
           new pname[200];
           new string[200];
           GetPlayerName(i, pname, sizeof(pname));
           if(IsPlayerAdmin(i)) return false;
           format(string, sizeof(string), "(ANTI-CHEAT BAN) %s has been banned by the anti-cheat system for weapon hacking", pname);
           SendClientMessageToAll(COLOR_RED,string);
           SetTimer("banningtimer",2000,0);
           banning[i] =1;
        }
    }
    return 1;
}
Reply
#3

Quote:
Originally Posted by humildadeforever
Посмотреть сообщение
pawn Код:
//anti-cheat by viper
//so far only 1 hack is covered but more is being developed
//please dont remove credits


#include <a_samp>


#define FILTERSCRIPT

#if defined FILTERSCRIPT

#define COLOR_RED 0xFF0000AA

new banning[MAX_PLAYERS];

forward banningtimer();//timer for when getting banned
forward weaponanti();//checks if a player has an illegal weapon

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" Anti-cheat by viper");
    print("--------------------------------------\n");

    SetTimer("weaponanti",5000,1);
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

#endif

public OnPlayerConnect(playerid)
{
    SendClientMessage(playerid,COLOR_RED,"Este Servidor й Protegido!Nгo uso Cheats ou qualquer coisa do tipo.");
    return 1;
}

public banningtimer()
{
    for (new i = 0; i < MAX_PLAYERS; i++)
    {
        if(banning[i] == 1)
        {
            Ban(i);
        }
    }
    return 1;
}

public weaponanti()
{
    for (new i = 0; i < MAX_PLAYERS; i++)
    {
        if (GetPlayerWeapon(i) == 38 || GetPlayerWeapon(i) == 35 || GetPlayerWeapon(i) == 36)
        {
           new pname[200];
           new string[200];
           GetPlayerName(i, pname, sizeof(pname));
           if(IsPlayerAdmin(i)) return false;
           format(string, sizeof(string), "(ANTI-CHEAT BAN) %s has been banned by the anti-cheat system for weapon hacking", pname);
           SendClientMessageToAll(COLOR_RED,string);
           SetTimer("banningtimer",2000,0);
           banning[i] =1;
        }
    }
    return 1;
}
Quando uso Minigun como admin, sou banido.
Reply
#4

Vocк precisa estar logado na Rcon para nгo ser banido.

Troque tambйm
pawn Код:
if(IsPlayerAdmin(i)) return false;
Por
pawn Код:
if(IsPlayerAdmin(i)) continue;
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)