[Ajuda] Ant Xiter
#1

Seguinte, tem um anti xiter no meu gm e tipo, atй qnd sуcio pega o jetpack aparece a msg pros admins, keria que quando o socio pegasse nгo aparecesse, tentei por a linha:
pawn Код:
if(PlayerInfo[playerid][pSocio] == 1)
Mais nгo deu

Segue o cуdigo:
pawn Код:
public CheckHack() // Anti Xiter de Armas e Jet Pack
{
    new string[128];
    new giveplayer[MAX_PLAYER_NAME];
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i) && gPlayerLogged[i] == 1 && !IsPlayerNPC(i) && spawnado[i] > 0)
        {
// JetPack
if(GetPlayerSpecialAction(i) == SPECIAL_ACTION_USEJETPACK)
                {
                GetPlayerName(i, giveplayer, sizeof(giveplayer));
                format(string, sizeof(string), "ANTICHEAT: %s[ID %d] estб usando um JetPack /tv nele rapido!", giveplayer,i);
                ABroadCast(COLOR_LIGHTRED,string,1);
                }

Linha do sуcio:
pawn Код:
pSocio
Ve se me ajuda aew , +rep
Reply
#2

n testei, testa ae.
PHP код:
public CheckHack() // Anti Xiter de Armas e Jet Pack
{
    new 
string[128];
    new 
giveplayer[MAX_PLAYER_NAME];
    for(new 
0MAX_PLAYERSi++)
    {
        if(
IsPlayerConnected(i) && gPlayerLogged[i] == && !IsPlayerNPC(i) && spawnado[i] > 0)
        {
            
// JetPack
            
if(GetPlayerSpecialAction(i) == SPECIAL_ACTION_USEJETPACK)
             {
                  if(!
PlayerInfo[playerid][pSocio])
                {
                    
GetPlayerName(igiveplayersizeof(giveplayer));
                   
format(stringsizeof(string), "ANTICHEAT: %s[ID %d] estб usando um JetPack /tv nele rapido!",giveplayer,i);
                }
                
ABroadCast(COLOR_LIGHTRED,string,1);
                } 
Reply
#3

GM Play Hard?
Reply
#4

Quote:
Originally Posted by dodostyle
Посмотреть сообщение
GM Play Hard?
Nгo


@GReeN_WOoD
Seguinte erro:
Reply
#5

Tenta assim:
pawn Код:
public CheckHack() // Anti Xiter de Armas e Jet Pack
{
    new string[128];
    new giveplayer[MAX_PLAYER_NAME];
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i) && gPlayerLogged[i] == 1 && !IsPlayerNPC(i) && spawnado[i] > 0)
        {
            // JetPack
            if(GetPlayerSpecialAction(i) == SPECIAL_ACTION_USEJETPACK)
             {
                  if(!PlayerInfo[giveplayer][pSocio])
                {
                    GetPlayerName(i, giveplayer, sizeof(giveplayer));
                   format(string, sizeof(string), "ANTICHEAT: %s[ID %d] estб usando um JetPack /tv nele rapido!",giveplayer,i);
                }
                ABroadCast(COLOR_LIGHTRED,string,1);
                }
Ajudei Reep +
Reply
#6

Quote:
Originally Posted by Caio_Freeze
Посмотреть сообщение
Tenta assim:
pawn Код:
public CheckHack() // Anti Xiter de Armas e Jet Pack
{
    new string[128];
    new giveplayer[MAX_PLAYER_NAME];
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i) && gPlayerLogged[i] == 1 && !IsPlayerNPC(i) && spawnado[i] > 0)
        {
            // JetPack
            if(GetPlayerSpecialAction(i) == SPECIAL_ACTION_USEJETPACK)
             {
                  if(!PlayerInfo[giveplayer][pSocio])
                {
                    GetPlayerName(i, giveplayer, sizeof(giveplayer));
                   format(string, sizeof(string), "ANTICHEAT: %s[ID %d] estб usando um JetPack /tv nele rapido!",giveplayer,i);
                }
                ABroadCast(COLOR_LIGHTRED,string,1);
                }
Ajudei Reep +
49770 Erro C:\Users\Emerson\Downloads\Brasil Life Extre... 033: array must be indexed(variable"giveplayer")
Reply
#7

Veja assim:
pawn Код:
public CheckHack()// Anti Xiter de Armas e Jet Pack
{
    new string[128];
    new giveplayer[MAX_PLAYER_NAME];
    for(new i = 0; i < MAX_PLAYERS; i++) {
        if(IsPlayerConnected(i) && gPlayerLogged[i] == 1 && !IsPlayerNPC(i) && PlayerInfo[giveplayer][pSocio] && spawnado[i] > 0) {

            if(GetPlayerSpecialAction(i) == SPECIAL_ACTION_USEJETPACK) {
                GetPlayerName(i, giveplayer, sizeof(giveplayer));
                format(string, sizeof(string), "ANTICHEAT: %s[ID %d] estб usando um JetPack /tv nele rapido!", giveplayer,i);
                ABroadCast(COLOR_LIGHTRED,string,1);
            }
se nгo der assiim use esse:
pawn Код:
public CheckHack()// Anti Xiter de Armas e Jet Pack
{
    new string[128];
    new giveplayer[MAX_PLAYER_NAME];
    for(new i = 0; i < MAX_PLAYERS; i++) {
        if(IsPlayerConnected(i) && gPlayerLogged[i] == 1 && !IsPlayerNPC(i) && spawnado[i] > 0) {

            if(GetPlayerSpecialAction(i) == SPECIAL_ACTION_USEJETPACK && PlayerInfo[giveplayer][pSocio])
               {
                GetPlayerName(i, giveplayer, sizeof(giveplayer));
                format(string, sizeof(string), "ANTICHEAT: %s[ID %d] estб usando um JetPack /tv nele rapido!", giveplayer,i);
                ABroadCast(COLOR_LIGHTRED,string,1);
            }
Reply
#8

Quote:
Originally Posted by Caio_Freeze
Посмотреть сообщение
Tenta assim:
pawn Код:
public CheckHack() // Anti Xiter de Armas e Jet Pack
{
    new string[128];
    new giveplayer[MAX_PLAYER_NAME];
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i) && gPlayerLogged[i] == 1 && !IsPlayerNPC(i) && spawnado[i] > 0)
        {
            // JetPack
            if(GetPlayerSpecialAction(i) == SPECIAL_ACTION_USEJETPACK)
             {
                  if(!PlayerInfo[giveplayer][pSocio])
                {
                    GetPlayerName(i, giveplayer, sizeof(giveplayer));
                   format(string, sizeof(string), "ANTICHEAT: %s[ID %d] estб usando um JetPack /tv nele rapido!",giveplayer,i);
                }
                ABroadCast(COLOR_LIGHTRED,string,1);
                }
Ajudei Reep +
Pedindo rep pra little


Topic
Tente assim:
pawn Код:
public CheckHack() // Anti Xiter de Armas e Jet Pack
{
    new string[128];
    new giveplayer[MAX_PLAYER_NAME];
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i) && gPlayerLogged[i] == 1 && !IsPlayerNPC(i) && spawnado[i] > 0)
        {
            // JetPack
            if(GetPlayerSpecialAction(i) == SPECIAL_ACTION_USEJETPACK)
             {
                  if(!PlayerInfo[i][pSocio])
                {
                    GetPlayerName(i, giveplayer, sizeof(giveplayer));
                   format(string, sizeof(string), "ANTICHEAT: %s[ID %d] estб usando um JetPack /tv nele rapido!",giveplayer,i);
                }
                ABroadCast(COLOR_LIGHTRED,string,1);
                }
Codigo do Caio..
Reply
#9

Quote:
Originally Posted by @Riichard
Посмотреть сообщение
Pedindo rep pra little
n vi q ele era little ¬¬
Reply
#10

Consegui tirar o erro, vlw glr vcs sгo de+
Nгo tentei de alguns mais o cуdigo ficou assim:
pawn Код:
public CheckHack() // Anti Xiter de Armas e Jet Pack
{
    new playerid; playerid<MAX_PLAYERS; playerid++;// editei essa linha
    new string[128];
    new giveplayer[MAX_PLAYER_NAME];
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i) && gPlayerLogged[i] == 1 && !IsPlayerNPC(i) && spawnado[i] > 0)
        {
            // JetPack
            if(GetPlayerSpecialAction(i) == SPECIAL_ACTION_USEJETPACK)
             {
                  if(PlayerInfo[playerid][pSocio] >= 1)// acrescentei essa
                {
                    GetPlayerName(i, giveplayer, sizeof(giveplayer));
                   format(string, sizeof(string), "ANTICHEAT: %s[ID %d] estб usando um JetPack /tv nele rapido!",giveplayer,i);
                }
                ABroadCast(COLOR_LIGHTRED,string,1);
                }

dei uma estudada e consegui .
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)